WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / net / test_vxlan_fdb_changelink.sh
blob2d442cdab11e19d3eb116f1bee4136aedd68443a
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
4 # Check FDB default-remote handling across "ip link set".
6 check_remotes()
8 local what=$1; shift
9 local N=$(bridge fdb sh dev vx | grep 00:00:00:00:00:00 | wc -l)
11 echo -ne "expected two remotes after $what\t"
12 if [[ $N != 2 ]]; then
13 echo "[FAIL]"
14 EXIT_STATUS=1
15 else
16 echo "[ OK ]"
20 ip link add name vx up type vxlan id 2000 dstport 4789
21 bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent
22 bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent
23 check_remotes "fdb append"
25 ip link set dev vx type vxlan remote 192.0.2.30
26 check_remotes "link set"
28 ip link del dev vx
29 exit $EXIT_STATUS