Lines Matching +full:no +full:- +full:ether +full:- +full:link
2 # SPDX-License-Identifier: GPL-2.0
4 # In-place tunneling
9 readonly ns_prefix="ns-$$-"
31 ip link add dev veth1 mtu 1500 netns "${ns1}" type veth \
34 ip netns exec "${ns1}" ethtool -K veth1 tso off
36 ip -netns "${ns1}" link set veth1 up
37 ip -netns "${ns2}" link set veth2 up
39 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1
40 ip -netns "${ns2}" -4 addr add "${ns2_v4}/24" dev veth2
41 ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad
42 ip -netns "${ns2}" -6 addr add "${ns2_v6}/64" dev veth2 nodad
45 ip -netns "${ns1}" -4 route flush table main
46 ip -netns "${ns1}" -6 route flush table main
47 ip -netns "${ns1}" -4 route add "${ns2_v4}" mtu 1458 dev veth1
48 ip -netns "${ns1}" -6 route add "${ns2_v6}" mtu 1438 dev veth1
59 if [[ -f "${outfile}" ]]; then
62 if [[ -f "${infile}" ]]; then
66 if [[ -n $server_pid ]]; then
72 ip netns exec "${ns2}" nc "${netcat_opt}" -l -p "${port}" > "${outfile}" &
78 ip netns exec "${ns1}" timeout 2 nc "${netcat_opt}" -w 1 "${addr2}" "${port}" < "${infile}"
95 set -e
97 # no arguments: automated test, run all
98 if [[ "$#" -eq "0" ]]; then
138 if [[ "$#" -ne "4" ]]; then
149 readonly netcat_opt=-${ipproto}
160 readonly netcat_opt=-${ipproto}
163 readonly fouproto="41 -6"
164 readonly fouproto_mpls="${mplsproto} -6"
190 # client can no longer connect
193 bpf direct-action object-file ./test_tc_tunnel.o \
202 targs="encap fou encap-sport auto encap-dport $udpport"
214 targs="encap fou encap-sport auto encap-dport $dport"
234 ip netns exec "${ns2}" ip link add name testtun0 type "${ttype}" \
240 # No support for MPLS IPv6 fou tunnel; expect failure.
243 # No support for TEB fou tunnel; expect failure.
247 ethaddr=$(ip netns exec "${ns2}" ip link show veth2 | \
248 awk '/ether/ { print $2 }')
249 ip netns exec "${ns2}" ip link set testtun0 address $ethaddr
253 ip netns exec "${ns2}" sysctl -qw net.mpls.platform_labels=65536
254 ip netns exec "${ns2}" ip -f mpls route add 1000 dev lo
255 ip netns exec "${ns2}" ip link set lo up
256 ip netns exec "${ns2}" sysctl -qw net.mpls.conf.testtun0.input=1
257 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.lo.rp_filter=0
264 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.rp_filter=0
266 # selected as the max of the "all" and device-specific values.
267 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.testtun0.rp_filter=0
268 ip netns exec "${ns2}" ip link set dev testtun0 up
287 ip netns exec "${ns2}" ip link del dev testtun0
290 bpf direct-action object-file ./test_tc_tunnel.o section decap