Commit ca5ba1cb authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

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: default avatarIdo Schimmel <idosch@mellanox.com>
Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1538812e
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
ALL_TESTS=" ALL_TESTS="
ping_ipv4 ping_ipv4
arp_decap
" "
NUM_NETIFS=6 NUM_NETIFS=6
source lib.sh source lib.sh
...@@ -465,6 +466,23 @@ ping_ipv4() ...@@ -465,6 +466,23 @@ ping_ipv4()
ping_test $h2 10.1.1.102 ": local->remote vid 20->vid 10" ping_test $h2 10.1.1.102 ": local->remote vid 20->vid 10"
} }
arp_decap()
{
# Repeat the ping tests, but without populating the neighbours. This
# makes sure we correctly decapsulate ARP packets
log_info "deleting neighbours from vlan interfaces"
ip neigh del 10.1.1.102 dev vlan10
ip neigh del 10.1.2.102 dev vlan20
ping_ipv4
ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \
dev vlan10 extern_learn
ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \
dev vlan20 extern_learn
}
trap cleanup EXIT trap cleanup EXIT
setup_prepare setup_prepare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment