__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
#!/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
REQUIRE_MZ=no
NUM_NETIFS=0
lib_dir=$(dirname "$0")
source "$lib_dir"/../../../net/forwarding/lib.sh

sw="sw-$(mktemp -u XXXXXX)"
host="ns-$(mktemp -u XXXXXX)"

cleanup()
{
	ip netns del $sw
	ip netns del $host
}

wait_lladdr_dad()
{
	$@ | grep fe80 | grep -qv tentative
}

wait_bond_up()
{
	$@ | grep -q 'state UP'
}

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)
# wait some time to make sure bridge lladdr pass DAD
slowwait 2 wait_lladdr_dad ip -n $sw addr show br0

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

slowwait 5 wait_bond_up ip -n $host link show bond0

rc=0
if ip -n $host link show bond0 | grep -q LOWER_UP; then
	echo "PASS"
else
	echo "FAIL"
	rc=1
fi
exit $rc

Filemanager

Name Type Size Permission Actions
Makefile File 492 B 0644
bond-arp-interval-causes-panic.sh File 1.27 KB 0755
bond-break-lacpdu-tx.sh File 1.87 KB 0755
bond-eth-type-change.sh File 2.3 KB 0755
bond-lladdr-target.sh File 1.77 KB 0755
bond_macvlan_ipvlan.sh File 2.98 KB 0755
bond_options.sh File 10.25 KB 0755
bond_topo_2d1c.sh File 3.72 KB 0644
bond_topo_3d1c.sh File 1.45 KB 0644
dev_addr_lists.sh File 2.05 KB 0755
lag_lib.sh File 4.52 KB 0644
mode-1-recovery-updelay.sh File 1.25 KB 0755
mode-2-recovery-updelay.sh File 1.25 KB 0755
Filemanager