Why the journal log records IPv6(::ffff:127.0.0.1) not IPv4(127.0.0.1)
常晓明
xiaoqian1641 at 163.com
Thu Feb 20 19:25:48 AEDT 2020
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) .
Does anybody know why?
if constexpr (std::is_same_v<Adaptor,
boost::beast::ssl_stream<
boost::asio::ip::tcp::socket>>)
{
boost::system::error_code ec;
auto remoteEnd = adaptor.next_layer().remote_endpoint(ec);
if (!ec)
{
req->remoteIp = remoteEnd.address().to_string();
}
}
else
{
boost::system::error_code ec;
auto remoteEnd = adaptor.remote_endpoint(ec);
if (!ec)
{
req->remoteIp = remoteEnd.address().to_string();
}
}
Many Thx
Johny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20200220/d8f0d921/attachment-0001.htm>
More information about the openbmc
mailing list