aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2019-08-26 12:58:48 +0000
committerFlorin Coras <florin.coras@gmail.com>2019-08-26 14:26:07 +0000
commit59ac9c23c47962fbbd935e7075ff7ee89e955847 (patch)
treebec27abfac0a07e8dc6611c2f8fe3c6768a3e4c4 /src/vnet
parente7e8bf37f100b20acb99957572f1796f648c2853 (diff)
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 <ayourtch@gmail.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ip/ip.c1
1 files changed, 1 insertions, 0 deletions
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));
}