Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: forwarding: Add a test case for ARP decapsulation

Verify that ARP packets are correctly decapsulated by the ingress VTEP
by removing the neighbours configured on both VLAN interfaces and
running a ping test.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ido Schimmel and committed by
David S. Miller
ca5ba1cb 1538812e

+18
+18
tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
··· 93 93 94 94 ALL_TESTS=" 95 95 ping_ipv4 96 + arp_decap 96 97 " 97 98 NUM_NETIFS=6 98 99 source lib.sh ··· 464 463 ping_test $h2 10.1.2.102 ": local->remote vid 20->vid 20" 465 464 ping_test $h1 10.1.2.102 ": local->remote vid 10->vid 20" 466 465 ping_test $h2 10.1.1.102 ": local->remote vid 20->vid 10" 466 + } 467 + 468 + arp_decap() 469 + { 470 + # Repeat the ping tests, but without populating the neighbours. This 471 + # makes sure we correctly decapsulate ARP packets 472 + log_info "deleting neighbours from vlan interfaces" 473 + 474 + ip neigh del 10.1.1.102 dev vlan10 475 + ip neigh del 10.1.2.102 dev vlan20 476 + 477 + ping_ipv4 478 + 479 + ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \ 480 + dev vlan10 extern_learn 481 + ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \ 482 + dev vlan20 extern_learn 467 483 } 468 484 469 485 trap cleanup EXIT