summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gbp/vxlan_gbp.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-05 06:11:57 -0800
committerNeale Ranns <nranns@cisco.com>2019-03-05 19:58:00 +0000
commit665581a5de364341c8c924d39dbb54a2bda3715c (patch)
treec73a6a9dd89f67bc3121a6f2d60cfc1def6d3f34 /src/vnet/vxlan-gbp/vxlan_gbp.c
parentd7f872e8d87eedd10189c6a41f1a6a394160f734 (diff)
VXLAN-GBP: decap checks src,dst&VNI for unicast, then checks only dst&VNI for multicast
Change-Id: I17caf3c5a2060de497c44655b66a15a2007f716b Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/vxlan-gbp/vxlan_gbp.c')
-rw-r--r--src/vnet/vxlan-gbp/vxlan_gbp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/vxlan-gbp/vxlan_gbp.c b/src/vnet/vxlan-gbp/vxlan_gbp.c
index 691cc762549..db10f5448e4 100644
--- a/src/vnet/vxlan-gbp/vxlan_gbp.c
+++ b/src/vnet/vxlan-gbp/vxlan_gbp.c
@@ -394,7 +394,9 @@ int vnet_vxlan_gbp_tunnel_add_del
int not_found;
if (!is_ip6)
{
- key4.key[0] = a->dst.ip4.as_u32;
+ key4.key[0] = ip46_address_is_multicast (&a->dst) ?
+ a->dst.ip4.as_u32 :
+ a->dst.ip4.as_u32 | (((u64) a->src.ip4.as_u32) << 32);
key4.key[1] = (((u64) a->encap_fib_index) << 32)
| clib_host_to_net_u32 (a->vni << 8);
not_found =