Server IP : 13.213.54.232 / Your IP : 216.73.217.11 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/modules/6.8.0-1029-aws/build/tools/testing/selftests/drivers/net/bonding/ |
Upload File : |
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # Regression Test: # Verify bond interface could up when set IPv6 link local address target. # # +----------------+ # | br0 | # | | | sw # | veth0 veth1 | # +---+-------+----+ # | | # +---+-------+----+ # | veth0 veth1 | # | | | host # | bond0 | # +----------------+ # # We use veths instead of physical interfaces sw="sw-$(mktemp -u XXXXXX)" host="ns-$(mktemp -u XXXXXX)" cleanup() { ip netns del $sw ip netns del $host } trap cleanup 0 1 2 ip netns add $sw ip netns add $host ip -n $host link add veth0 type veth peer name veth0 netns $sw ip -n $host link add veth1 type veth peer name veth1 netns $sw ip -n $sw link add br0 type bridge ip -n $sw link set br0 up sw_lladdr=$(ip -n $sw addr show br0 | awk '/fe80/{print $2}' | cut -d'/' -f1) # sleep some time to make sure bridge lladdr pass DAD sleep 2 ip -n $host link add bond0 type bond mode 1 ns_ip6_target ${sw_lladdr} \ arp_validate 3 arp_interval 1000 # add a lladdr for bond to make sure there is a route to target ip -n $host addr add fe80::beef/64 dev bond0 ip -n $host link set bond0 up ip -n $host link set veth0 master bond0 ip -n $host link set veth1 master bond0 ip -n $sw link set veth0 master br0 ip -n $sw link set veth1 master br0 ip -n $sw link set veth0 up ip -n $sw link set veth1 up sleep 5 rc=0 if ip -n $host link show bond0 | grep -q LOWER_UP; then echo "PASS" else echo "FAIL" rc=1 fi exit $rc