diff options
author | Ole Troan <ot@cisco.com> | 2016-08-25 12:26:47 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-08-29 11:57:31 +0000 |
commit | d575e69177cc1462658ec1de1149730e0ffb0425 (patch) | |
tree | 8dd59056b41c380ffb1cd24ef9adc14d21fd3794 /vnet/vnet/map/map.c | |
parent | d46cca174394794073585da4819eacc2bd72e862 (diff) |
VPP-310 Mapping algorithm compute wrong ea-bits
Mapping of IPv4 prefixes ended up writing past IPv6 prefix + EA bits
length.
(Added some unit testing code).
Change-Id: I59893b44eea5cebf00a23afc405832741f84cf4f
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'vnet/vnet/map/map.c')
-rw-r--r-- | vnet/vnet/map/map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c index 17ecf460f51..91811df2f63 100644 --- a/vnet/vnet/map/map.c +++ b/vnet/vnet/map/map.c @@ -193,7 +193,8 @@ map_create_domain (ip4_address_t * ip4_prefix, if (ip4_prefix_len + ea_bits_len < 32) { flags |= MAP_DOMAIN_PREFIX; - suffix_len = suffix_shift = 32 - ip4_prefix_len - ea_bits_len; + suffix_shift = 32 - ip4_prefix_len - ea_bits_len; + suffix_len = ea_bits_len; } else { |