From de6faf9319216ed22abff93bf8c990241e1ff5f1 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Mon, 26 Aug 2019 12:58:48 +0000 Subject: ip: ip6_preflen_to_mask incorrect result for prefix len > 64 The as_u64[0] in the result was not correctly filled in for longer prefix lengths. Type: fix Fixes: 1c7104514c Change-Id: I871772c618475396d1c1c4c699ff77e35097f07e Signed-off-by: Andrew Yourtchenko (cherry picked from commit 59ac9c23c47962fbbd935e7075ff7ee89e955847) --- src/vnet/ip/ip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c index 133767bd06c..c5b43d446be 100644 --- a/src/vnet/ip/ip.c +++ b/src/vnet/ip/ip.c @@ -235,6 +235,7 @@ ip6_preflen_to_mask (u8 pref_len, ip6_address_t * mask) } else { + mask->as_u64[0] = 0xffffffffffffffffL; mask->as_u64[1] = clib_host_to_net_u64 (0xffffffffffffffffL << (128 - pref_len)); } -- cgit 1.2.3-korg