bareudp.sh (1ccd58331f6f2af73758e572f8aa0215b0cacc0e) | bareudp.sh (e865802357086b36632acf3e629f726f089a6769) |
---|---|
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 4# Test various bareudp tunnel configurations. 5# 6# The bareudp module allows to tunnel network protocols like IP or MPLS over 7# UDP, without adding any intermediate header. This scripts tests several 8# configurations of bareudp (using IPv4 or IPv6 as underlay and transporting --- 224 unchanged lines hidden (view full) --- 233 ip netns exec "${NS1}" sysctl -qw net.ipv4.ip_forward=1 234 ip netns exec "${NS2}" sysctl -qw net.ipv4.ip_forward=1 235 ip -netns "${NS1}" route add 192.0.2.100/32 via 192.0.2.10 236 ip -netns "${NS2}" route add 192.0.2.103/32 via 192.0.2.33 237 238 # The intermediate namespaces don't have routes for the reverse path, 239 # as it will be handled by tc. So we need to ensure that rp_filter is 240 # not going to block the traffic. | 1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 4# Test various bareudp tunnel configurations. 5# 6# The bareudp module allows to tunnel network protocols like IP or MPLS over 7# UDP, without adding any intermediate header. This scripts tests several 8# configurations of bareudp (using IPv4 or IPv6 as underlay and transporting --- 224 unchanged lines hidden (view full) --- 233 ip netns exec "${NS1}" sysctl -qw net.ipv4.ip_forward=1 234 ip netns exec "${NS2}" sysctl -qw net.ipv4.ip_forward=1 235 ip -netns "${NS1}" route add 192.0.2.100/32 via 192.0.2.10 236 ip -netns "${NS2}" route add 192.0.2.103/32 via 192.0.2.33 237 238 # The intermediate namespaces don't have routes for the reverse path, 239 # as it will be handled by tc. So we need to ensure that rp_filter is 240 # not going to block the traffic. |
241 ip netns exec "${NS1}" sysctl -qw net.ipv4.conf.all.rp_filter=0 242 ip netns exec "${NS2}" sysctl -qw net.ipv4.conf.all.rp_filter=0 |
|
241 ip netns exec "${NS1}" sysctl -qw net.ipv4.conf.default.rp_filter=0 242 ip netns exec "${NS2}" sysctl -qw net.ipv4.conf.default.rp_filter=0 243} 244 245setup_overlay_ipv6() 246{ 247 # Add the overlay IP addresses and route them through the veth devices 248 ip -netns "${NS0}" address add 2001:db8::100/128 dev lo --- 296 unchanged lines hidden --- | 243 ip netns exec "${NS1}" sysctl -qw net.ipv4.conf.default.rp_filter=0 244 ip netns exec "${NS2}" sysctl -qw net.ipv4.conf.default.rp_filter=0 245} 246 247setup_overlay_ipv6() 248{ 249 # Add the overlay IP addresses and route them through the veth devices 250 ip -netns "${NS0}" address add 2001:db8::100/128 dev lo --- 296 unchanged lines hidden --- |