summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index 65eb50e9c4a..accb2d6d70c 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -31,7 +31,8 @@ ip_is_local_host (ip46_address_t * ip46_address, u8 is_ip4)
if (is_ip4)
return (ip46_address->ip4.as_u8[0] == 127);
else
- return (ip46_address->as_u64[0] == 0 && ip46_address->as_u64[1] == 1);
+ return (ip46_address->as_u64[0] == 0 &&
+ clib_net_to_host_u64 (ip46_address->as_u64[1]) == 1);
}
u8
@@ -43,7 +44,8 @@ ip4_is_local_host (ip4_address_t * ip4_address)
u8
ip6_is_local_host (ip6_address_t * ip6_address)
{
- return (ip6_address->as_u64[0] == 0 && ip6_address->as_u64[1] == 1);
+ return (ip6_address->as_u64[0] == 0 &&
+ clib_net_to_host_u64 (ip6_address->as_u64[1]) == 1);
}
/**