diff options
author | Neale Ranns <nranns@cisco.com> | 2019-07-04 14:12:50 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-07-05 17:57:33 +0000 |
commit | 81cfa9cf388a742bad0d71ba1c92debb04c6cdba (patch) | |
tree | 5d70a658456730b7c6834d9a0c2279ec40d25bd8 /test | |
parent | fe2fff37bbe215f092a452e8322de7f885fc0298 (diff) |
vxlan-gbp: Decap ignores reserved bits
Type: fix
from the draft:
3. Backward Compatibility
VXLAN [RFC7348] requires reserved fields to be set to zero on
transmit and ignored on receive.
Change-Id: I98544907894f1a6eba9595a37c3c88322905630e
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test_gbp.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_gbp.py b/test/test_gbp.py index e4d4390f081..37d587f51b4 100644 --- a/test/test_gbp.py +++ b/test/test_gbp.py @@ -1719,14 +1719,15 @@ class TestGBP(VppTestCase): # Learn new EPs from GARP packets received on the BD's mcast tunnel # for ii, l in enumerate(learnt): - # a packet with an sclass from a known EPG - # arriving on an unknown TEP + # add some junk in the reserved field of the vxlan-header + # next to the VNI. we should accept since reserved bits are + # ignored on rx. p = (Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) / IP(src=self.pg2.remote_hosts[1].ip4, dst="239.1.1.1") / UDP(sport=1234, dport=48879) / - VXLAN(vni=88, gpid=112, flags=0x88) / + VXLAN(vni=88, reserved2=0x80, gpid=112, flags=0x88) / Ether(src=l['mac'], dst="ff:ff:ff:ff:ff:ff") / ARP(op="who-has", psrc=l['ip'], pdst=l['ip'], @@ -1832,12 +1833,14 @@ class TestGBP(VppTestCase): # for l in learnt: # a packet with an sclass from a known EPG + # set a reserved bit in addition to the G and I + # reserved bits should not be checked on rx. p = (Ether(src=self.pg2.remote_mac, dst=self.pg2.local_mac) / IP(src=self.pg2.remote_hosts[1].ip4, dst=self.pg2.local_ip4) / UDP(sport=1234, dport=48879) / - VXLAN(vni=99, gpid=112, flags=0x88) / + VXLAN(vni=99, gpid=112, flags=0xc8) / Ether(src=l['mac'], dst=ep.mac) / IP(src=l['ip'], dst=ep.ip4.address) / UDP(sport=1234, dport=1234) / |