I have an error in reasoning :-D The current git-code is correct! (NO bug)
example:
little endian:
IpAddress(1, 2, 3, 4);
-->
(1 << 24) | ( 2 << 16) | (3 << 8) | (4 << 0) = 0x01020304
-->
0x01020304 (host order, little endian, in memory: 0x04, 0x03, 0x02, 0x01)
--> htonl(0x01020304) --> 0x04030201 (network order, in memory: 0x01, 0x02, 0x03, 0x04)
0x04030201 (memory: 0x01, 0x02, 0x03, 0x04) in m_address is network order and is CORRECT!!!
example:
big endian architecture (host order = network order. htonl() return the same value)
IpAddress(1, 2, 3, 4);
-->
(1 << 24) | ( 2 << 16) | (3 << 8) | (4 << 0) = 0x01020304
-->
0x01020304 (host order, big endian, in memory: 0x01, 0x02, 0x03, 0x04)
--> htonl(0x01020304) --> 0x01020304 (network order, in memory: 0x01, 0x02, 0x03, 0x04)
0x01020304 (memory: 0x01, 0x02, 0x03, 0x04) is network order and the value (i think) is CORRECT.
Ok both examples have in memory 0x01, 0x02, 0x03, 0x04. So the code should have no bug :-D sorry ;-)