[ https://issues.apache.org/jira/browse/MESOS-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14157344#comment-14157344 ]
Anindya Sinha commented on MESOS-1835: -------------------------------------- inet_pton returns network order which is big endian. So, 127.0.0.1 is stored as 0x100007f (16777343) when stored in __ip__ on little endian machines. However, check for __ip__ is being done for 2130706433. So that check fails. On big endian machines, __ip__ should be stored as 0x7f000001 (2130706433) although I do not have means to verify this, and hence the check for __ip__ == 2130706433 would succeed. > Check for IP address being localhost not platform independent > ------------------------------------------------------------- > > Key: MESOS-1835 > URL: https://issues.apache.org/jira/browse/MESOS-1835 > Project: Mesos > Issue Type: Bug > Components: libprocess > Affects Versions: 0.20.1 > Reporter: Anindya Sinha > Assignee: Evelina Dumitrescu > > In process::initialize() [3rdparty/src/libprocess/process.cpp], check for > __ip__ for localhost (127.0.0.1) is done by checking if __ip__ == 2130706433. > However, it could be either 2130706433 or 16777343 depending on endianness. > This check should succeed independent of the endianness, so would be good to > do a 'inet_ntop' and then compare against the string for 127.0.0.1. -- This message was sent by Atlassian JIRA (v6.3.4#6332)