summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2018-03-20 09:22:13 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-03-26 21:56:16 +0000
commitde91006803f823a149b04738dd2bbfe18bfe9791 (patch)
tree9e7d3090dc6c0926a5fc72d5f908fd1da4a88c3c /src/vnet
parent0a15e8c3b6a7e19131f7abc6fd4d1422616cda5c (diff)
VCL: add IPv6 to socket_test.sh and make test
Change-Id: If3827828062a46f1cce43642535333f677f06e62 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/vnet')
-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);
}
/**