diff options
author | Milan Lenco <milan.lenco@pantheon.tech> | 2017-11-24 17:12:33 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-11-26 20:48:08 +0000 |
commit | 8b9a5d198cc316d36b93f19fee7a351fc3922e4a (patch) | |
tree | 5f8cf5b482c6d9795c5d523c82cc89fec16e820d /src/vnet/ip/ip.c | |
parent | 6bcac065b82ef2e48fc23db18534d9dc9a7833a1 (diff) |
Fix session rule port endianness.
Change-Id: I43a7ac5b6c33810a465568d1955f400f4ef08786
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r-- | src/vnet/ip/ip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c index 0c4687d81a1..b6825c30709 100644 --- a/src/vnet/ip/ip.c +++ b/src/vnet/ip/ip.c @@ -254,8 +254,8 @@ ip6_mask_to_preflen (ip6_address_t * mask) u8 first1, first0; if (mask->as_u64[0] == 0 && mask->as_u64[1] == 0) return 0; - first1 = log2_first_set (mask->as_u64[1]); - first0 = log2_first_set (mask->as_u64[0]); + first1 = log2_first_set (clib_net_to_host_u64 (mask->as_u64[1])); + first0 = log2_first_set (clib_net_to_host_u64 (mask->as_u64[0])); if (first1 != 0) return 128 - first1; |