]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
selftests: forwarding: vxlan_bridge_1d: Fix vxlan ecn decapsulate value
authorHangbin Liu <liuhangbin@gmail.com>
Fri, 19 Mar 2021 14:33:14 +0000 (22:33 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:37 +0000 (15:42 -0500)
commit9d8f6f019a867cf25dcfce2ceeb26b1c87b0848a
tree392a525bddb699e315f84203d06bc101f55e45af
parent0b4a213e44cea3d209099a869a9d96a4e754f58e
selftests: forwarding: vxlan_bridge_1d: Fix vxlan ecn decapsulate value

BugLink: https://bugs.launchpad.net/bugs/1922601
[ Upstream commit 5aa3c334a449bab24519c4967f5ac2b3304c8dcf ]

The ECN bit defines ECT(1) = 1, ECT(0) = 2. So inner 0x02 + outer 0x01
should be inner ECT(0) + outer ECT(1). Based on the description of
__INET_ECN_decapsulate, the final decapsulate value should be
ECT(1). So fix the test expect value to 0x01.

Before the fix:
TEST: VXLAN: ECN decap: 01/02->0x02                                 [FAIL]
        Expected to capture 10 packets, got 0.

After the fix:
TEST: VXLAN: ECN decap: 01/02->0x01                                 [ OK ]

Fixes: a0b61f3d8ebf ("selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh