1 #!/bin/bash 2 # SPDX-License-Identifier: GPL-2.0 3 4 # Check FDB default-remote handling across "ip link set". 5 6 check_remotes() 7 { 8 local what=$1; shift 9 local N=$(bridge fdb sh dev vx | grep 00:00:00:00:00:00 | wc -l) 10 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 ]" 17 fi 18 } 19 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" 24 25 ip link set dev vx type vxlan remote 192.0.2.30 26 check_remotes "link set" 27 28 ip link del dev vx 29 exit $EXIT_STATUS
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.