ClientOriginIPAddress is 0.0.0.0 or ""

Sunitha Harish sunithaharish04 at gmail.com
Fri Apr 9 15:51:52 AEST 2021


On 06-04-2021 22:21, Ed Tanous wrote:
> On Tue, Mar 23, 2021 at 3:28 PM Jun-Lin Chen (陳俊霖)
> <Jun-Lin.Chen at quantatw.com> wrote:
>> Hi,
>>
>> If continously send POST sessions Redfish request via Postman. I observe bmcweb debug logs, it will established connection at first request then not fetch user ip after the second request.
>>
>>
>>
>> That's why ClientOriginIPAddress in session after the second created is always 0.0.0.0 (not be assigned).
>>
>>
>>
>> In HTTP 1.1 It uses keep-alive Header default. so BMC does not fetch user IP when its connection is established.
>>
>>
>>
>> Is this behavior we expect?
>>
>>
>>
>> Best regards,
>>
>> Jun-Lin Chen
>
> Sunitha,
> Considering this is code you wrote, would you mind replying to Jun-Lin
> about his experience and what the expected behavior is?  For what it's
> worth, I've seen it report 0.0.0.0 before on my system, I just haven't
> had a chance to chase it down and debug it.
>
> -Ed

Hi Jun-Lin,

The ClientOriginIPAddress is expected to get populated when the session 
is established to the BMC ( the first request). This is a one time 
fetch, and it will be persisted for that session.

Regards,
Sunitha
>>
>>
>> From: Jun-Lin Chen (陳俊霖)
>> Sent: Friday, March 5, 2021 4:05 PM
>> To: sunharis at in.ibm.com
>> Cc: openbmc at lists.ozlabs.org
>> Subject: ClientOriginIPAddress is 0.0.0.0 or ""
>>
>>
>>
>> Hi Sunitha,
>>
>>
>>
>> I found some problem when I create session.
>>
>> The property “ClientOriginIPAddress” is “” after POST https://${bmc}/login -d '{"username": <>,"password": <>}
>>
>> And it is 0.0.0.0 after POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"username": <>,"password": <>}'
>>
>> Both of them looked like something wrong. And I also look for source code in bmcweb repository.
>>
>> There only defined the default value: “” in generateUserSession() and not found fetch user ip in elsewhere.
>>
>> I think it is why ClientOriginIPAddress is strange.
>>
>>
>>
>> May I ask what step or something I lack in creation session so this property is abnormal?
>>
>>
>>
>>
>>
>> Best regards,
>>
>> Jun-Lin Chen
>>
>>


More information about the openbmc mailing list