diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-08-26 12:58:48 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-09-02 18:30:34 +0000 |
commit | de6faf9319216ed22abff93bf8c990241e1ff5f1 (patch) | |
tree | 59e66b3d2358d4bb14f70d803c1a4344ddcf7391 | |
parent | 404e24de56c278507171a5af290169e6fc12d9fd (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>
(cherry picked from commit 59ac9c23c47962fbbd935e7075ff7ee89e955847)
-rw-r--r-- | src/vnet/ip/ip.c | 1 |
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)); } |