Params: Print the IP components in the right order.
authorGabe Black <gblack@eecs.umich.edu>
Tue, 4 Jan 2011 22:11:49 +0000 (17:11 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Tue, 4 Jan 2011 22:11:49 +0000 (17:11 -0500)
src/base/inet.cc

index e4612c02d68ba72bf34030e5346e58b408342059..0fb864dab927f9fc126982976011e14c904ec762 100644 (file)
@@ -138,8 +138,8 @@ operator<<(ostream &stream, const IpAddress &ia)
 {
     uint32_t ip = ia.ip();
     ccprintf(stream, "%x.%x.%x.%x",
-            (uint8_t)(ip >> 0),  (uint8_t)(ip >> 8),
-            (uint8_t)(ip >> 16), (uint8_t)(ip >> 24));
+            (uint8_t)(ip >> 24), (uint8_t)(ip >> 16),
+            (uint8_t)(ip >> 8),  (uint8_t)(ip >> 0));
     return stream;
 }