aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2019-01-21 13:22:53 +0000
committerDavid S. Miller <davem@davemloft.net>2019-01-22 20:40:35 -0800
commitca5ba1cbc9d230fe2222a324aca069eab7e764ba (patch)
tree577b12b01a496f80d9f78b60445cc0c24ae04763 /tools/testing/selftests/net
parentselftests: forwarding: Add a test for VXLAN asymmetric routing (diff)
downloadlinux-dev-ca5ba1cbc9d230fe2222a324aca069eab7e764ba.tar.xz
linux-dev-ca5ba1cbc9d230fe2222a324aca069eab7e764ba.zip
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>
Diffstat (limited to 'tools/testing/selftests/net')
-rwxr-xr-xtools/testing/selftests/net/forwarding/vxlan_asymmetric.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
index 21828970ab89..909426c25585 100755
--- a/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
+++ b/tools/testing/selftests/net/forwarding/vxlan_asymmetric.sh
@@ -93,6 +93,7 @@
ALL_TESTS="
ping_ipv4
+ arp_decap
"
NUM_NETIFS=6
source lib.sh
@@ -465,6 +466,23 @@ ping_ipv4()
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
setup_prepare