Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da640bc0 authored by Roopa Prabhu's avatar Roopa Prabhu Committed by David S. Miller
Browse files

tools: selftests: rtnetlink: add testcases for vxlan flag sets



This patch extends rtnetlink.sh to cover some vxlan flag
netlink attribute sets.

Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70fb0828
Loading
Loading
Loading
Loading
+52 −0
Original line number Original line Diff line number Diff line
@@ -408,6 +408,58 @@ kci_test_encap_vxlan()
	ip netns exec "$testns" ip link add link "$vxlan" name "$vlan" type vlan id 1
	ip netns exec "$testns" ip link add link "$vxlan" name "$vlan" type vlan id 1
	check_err $?
	check_err $?


	# changelink testcases
	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan vni 43 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan group ffe5::5 dev "$devdummy" 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan ttl inherit 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan ttl 64
	check_err $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan nolearning
	check_err $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan proxy 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan norsc 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan l2miss 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan l3miss 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan external 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan udpcsum 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan udp6zerocsumtx 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan udp6zerocsumrx 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan remcsumtx 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan remcsumrx 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan gbp 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link set dev "$vxlan" type vxlan gpe 2>/dev/null
	check_fail $?

	ip netns exec "$testns" ip link del "$vxlan"
	ip netns exec "$testns" ip link del "$vxlan"
	check_err $?
	check_err $?