mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
selftests: mlxsw: Test VRF MAC vetoing
Test that it is possible to set an IP address on a VRF and that it is not vetoed. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
972fae683c
commit
7052e24363
1 changed files with 20 additions and 0 deletions
|
@ -11,6 +11,7 @@ lib_dir=$(dirname $0)/../../../net/forwarding
|
|||
|
||||
ALL_TESTS="
|
||||
rif_set_addr_test
|
||||
rif_vrf_set_addr_test
|
||||
rif_inherit_bridge_addr_test
|
||||
rif_non_inherit_bridge_addr_test
|
||||
vlan_interface_deletion_test
|
||||
|
@ -98,6 +99,25 @@ rif_set_addr_test()
|
|||
ip link set dev $swp1 addr $swp1_mac
|
||||
}
|
||||
|
||||
rif_vrf_set_addr_test()
|
||||
{
|
||||
# Test that it is possible to set an IP address on a VRF upper despite
|
||||
# its random MAC address.
|
||||
RET=0
|
||||
|
||||
ip link add name vrf-test type vrf table 10
|
||||
ip link set dev $swp1 master vrf-test
|
||||
|
||||
ip -4 address add 192.0.2.1/24 dev vrf-test
|
||||
check_err $? "failed to set IPv4 address on VRF"
|
||||
ip -6 address add 2001:db8:1::1/64 dev vrf-test
|
||||
check_err $? "failed to set IPv6 address on VRF"
|
||||
|
||||
log_test "RIF - setting IP address on VRF"
|
||||
|
||||
ip link del dev vrf-test
|
||||
}
|
||||
|
||||
rif_inherit_bridge_addr_test()
|
||||
{
|
||||
RET=0
|
||||
|
|
Loading…
Reference in a new issue