Why the journal log records IPv6(::ffff:127.0.0.1) not IPv4(127.0.0.1)

Patrick Williams patrick at stwcx.xyz
Fri Feb 21 03:20:41 AEDT 2020


On Thu, Feb 20, 2020 at 04:25:48PM +0800, 常晓明 wrote:
> Hi, Team,
> 
> 
> I enabled the "/xyz/openbmc_project/logging/rest_api_logs" and add the patch code as followed,  the journal log does not record IPv4(10.0.2.2) but IPv6(::ffff:10.0.2.2) .

That IPv6 address is the same as the IPv4 address, just in IPv6 format.

https://en.wikipedia.org/wiki/IPv6_address#Transition_from_IPv4

Generally, applications that support IPv6 don't [need to] know if they are
being connected to by an IPv4 or IPv6 end-point.  This is how the Linux
networking stack handles IPv6.  When the application indicates it
supports IPv6, the network stack will give it IPv6-formatted addresses
even for IPv4 connections.  This is what you're seeing here.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200220/ae5beeea/attachment.sig>


More information about the openbmc mailing list