Searched refs:netns (Results 26 - 50 of 280) sorted by last modified time

1234567891011>>

/linux-master/tools/testing/selftests/net/netfilter/
H A Dbridge_brouter.sh25 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.default.rp_filter=0
26 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.all.rp_filter=0
27 if ! ip link add veth0 netns "$nsbr" type veth peer name eth0 netns "$ns1"; then
31 ip link add veth1 netns "$nsbr" type veth peer name eth0 netns "$ns2"
56 if ! ip netns exec "$nsbr" ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redirect-target=DROP; then
61 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth0.forwarding=0
64 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
73 ip netns exe
[all...]
H A Dbr_netfilter.sh31 if ! ip netns exec "$fromns" ping -c 1 -q "$dstip" > /dev/null; then
33 ip netns exec "$ns0" nft list ruleset
48 if ! ip netns exec "$fromns" ping -q -f -b -c 1 -q "$dstip" > /dev/null 2>&1; then
50 ip netns exec "$ns0" nft list ruleset
57 ip netns exec "$ns0" sysctl -q net.ipv4.conf.all.rp_filter=0
58 ip netns exec "$ns0" sysctl -q net.ipv4.conf.default.rp_filter=0
60 if ! ip link add veth1 netns "$ns0" type veth peer name eth0 netns "$ns1"; then
65 ip link add veth2 netns "$ns0" type veth peer name eth0 netns "
[all...]
/linux-master/tools/testing/selftests/net/mptcp/
H A Dsimult_flows.sh73 ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
74 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth2 netns "$ns2"
75 ip link add ns2eth3 netns "$ns2" type veth peer name ns3eth1 netns "$ns3"
103 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1
104 ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1
149 ip netns exec ${ns3} tcpdump ${capopt} -w "${capfile}-listener.pcap" >> "${capout}" 2>&1 &
152 ip netns exe
[all...]
H A Dpm_netlink.sh65 ip netns exec "${ns1}" ./pm_nl_ctl limits
85 ip netns exec "${ns1}" ./pm_nl_ctl set "${addr}" flags "${flags}"
H A Dmptcp_lib.sh293 count=$(ip netns exec "${ns}" nstat -asz "${counter}" |
346 ip netns exec "${listener_ns}" cat /proc/net/tcp* | \
420 local netns
421 for netns in "${@}"; do
422 eval "${netns}=${netns}-${rndh}"
424 ip netns add "${!netns}" || exit ${KSFT_SKIP}
425 ip -net "${!netns}" link set lo up
426 ip netns exe
[all...]
H A Dmptcp_sockopt.sh55 ip netns exec $ns $t -A OUTPUT -p tcp --syn -m mark --mark $m -j ACCEPT
58 ip netns exec $ns $t -A OUTPUT -p tcp --tcp-flags RST RST -m mark --mark 0 -j ACCEPT
60 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark $m -j ACCEPT
61 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark 0 -j DROP
71 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
122 counters=$(ip netns exec $ns $tables -v -L OUTPUT | grep DROP)
173 ip netns exec ${listener_ns} \
181 ip netns exec ${connector_ns} \
196 ip netns exe
[all...]
H A Dmptcp_join.sh89 local netns
90 for netns in "$ns1" "$ns2"; do
91 ip netns exec $netns sysctl -q net.mptcp.pm_type=0 2>/dev/null || true
93 ip netns exec $netns sysctl -q net.mptcp.checksum_enabled=1
108 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
301 local netns
302 for netns i
[all...]
H A Dmptcp_connect.sh168 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
169 ip link add ns2eth3 netns "$ns2" type veth peer name ns3eth2 netns "$ns3"
170 ip link add ns3eth4 netns "$ns3" type veth peer name ns4eth3 netns "$ns4"
188 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1
189 ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1
200 ip netns exec "$ns3" sysctl -q net.ipv4.ip_forward=1
201 ip netns exe
[all...]
H A Ddiag.sh22 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGUSR1 &>/dev/null
25 [ -z "$(ip netns pids "${ns}")" ] && break
34 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGKILL &>/dev/null
44 ip netns exec $ns cat /proc/net/protocols | awk '$1~/^MPTCP$/{print $3}'
264 ip netns exec ${listener_ns} grep -q " 0100007F:${port_hex} " /proc/net/tcp && break
274 ip netns exec $ns \
278 chk_msk_nr 0 "no msk on netns creation"
283 ip netns exec $ns \
300 ip netns exec $ns \
306 ip netns exe
[all...]
/linux-master/tools/testing/selftests/net/lib/py/
H A D__init__.py5 from .netns import NetNS
/linux-master/tools/testing/selftests/net/
H A Dlib.sh107 ip netns delete "${ns}" &> /dev/null
108 if ! busywait $BUSYWAIT_TIMEOUT ip netns list \| grep -vq "^$ns$" &> /dev/null; then
123 # setup netns with given names as prefix. e.g
131 # Some test may setup/remove same netns multi times
141 if ! ip netns add "$ns"; then
H A Dfib_rule_tests.sh96 IP="ip -netns $testns"
117 IP_PEER="ip -netns $peerns"
120 ip link add name veth0 netns $testns type veth \
121 peer name veth1 netns $peerns
143 ip netns del $peerns
367 ip netns exec $testns sysctl -qw net.ipv4.ip_forward=1
368 ip netns exec $testns sysctl -qw net.ipv4.conf.$DEV.rp_filter=0
371 ip netns exec $testns sysctl -qw net.ipv4.ip_forward=0
H A Dcmsg_time.sh21 ip netns exec $NS sysctl -w net.ipv4.ping_group_range='0 2147483647' > /dev/null
24 ip -netns $NS link add type dummy
25 ip -netns $NS link set dev dummy0 up
26 ip -netns $NS addr add $IP4 dev dummy0
27 ip -netns $NS addr add $IP6 dev dummy0
30 ip netns exec $NS tc qdisc replace dev dummy0 root fq
53 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234)
56 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t | wc -l)
58 ts=$(ip netns exec $NS ./cmsg_sender -p $p $i 1234 -t |
61 ts=$(ip netns exe
[all...]
H A Dbpf_offload.py42 netns = [] # net namespaces to be removed variable
152 ns = "ip netns exec %s " % (ns)
257 ret, _ = ip("netns add %s" % (name), fail=False)
259 netns.append(name)
408 ip("link set dev %s netns %s" % (self.dev["ifname"], name), ns=self.ns)
524 global files, netns, devs
530 for ns in netns:
531 cmd("ip netns delete %s" % (ns))
533 netns = []
740 cmd("ip netns delet
741 netns = [] variable
[all...]
H A Damt.sh16 # | LISTENER netns |
28 # | . GATEWAY netns |
48 # | RELAY netns . |
72 # | SOURCE netns |
86 ip netns delete "${ns}" 2>/dev/null || true
94 ip netns add "${LISTENER}" || exit_cleanup
95 ip netns add "${GATEWAY}" || exit_cleanup "${LISTENER}"
96 ip netns add "${RELAY}" || exit_cleanup "${LISTENER}" "${GATEWAY}"
97 ip netns add "${SOURCE}" || exit_cleanup "${LISTENER}" "${GATEWAY}" \
111 ip -netns "
[all...]
H A DMakefile36 TEST_PROGS += netns-name.sh
/linux-master/tools/testing/selftests/net/hsr/
H A Dhsr_ping.sh138 ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
139 ip link add ns1eth2 netns "$ns1" type veth peer name ns3eth1 netns "$ns3"
140 ip link add ns3eth2 netns "$ns3" type veth peer name ns2eth2 netns "$ns2"
H A Dhsr_redbox.sh75 ip link add ns1eth1 netns "${ns1}" type veth peer name ns2eth1 netns "${ns2}"
76 ip link add ns1eth2 netns "${ns1}" type veth peer name ns2eth2 netns "${ns2}"
77 ip link add ns2eth3 netns "${ns2}" type veth peer name ns3eth1 netns "${ns3}"
78 ip link add ns3eth2 netns "${ns3}" type veth peer name ns4eth1 netns "${ns4}"
79 ip link add ns3eth3 netns "${ns3}" type veth peer name ns5eth1 netns "
[all...]
H A Dhsr_common.sh16 local netns="$1"
25 ip netns exec ${netns} ping ${ping_args} $connect_addr >/dev/null
27 echo "$netns -> $connect_addr connectivity [ FAIL ]" 1>&2
37 local netns="$1"
46 OUT="$(LANG=C ip netns exec ${netns} ping ${ping_args} $connect_addr | grep received)"
48 echo "$netns -> $connect_addr ping [ FAIL ]" 1>&2
57 echo "$netns -> $connect_addr ping TEST [ FAIL ]"
/linux-master/tools/testing/selftests/net/forwarding/
H A Dlib.sh1042 local netns=${1:-""}; shift
1044 tc $netns -j -s filter show $id \
1461 ip netns exec $name bash <<-EOF
1760 ns_cmd="ip netns exec ${ns}"
/linux-master/tools/testing/selftests/bpf/
H A Dtest_tc_tunnel.sh29 ip netns add "${ns1}"
30 ip netns add "${ns2}"
32 ip link add dev veth1 mtu 1500 netns "${ns1}" type veth \
33 peer name veth2 mtu 1500 netns "${ns2}"
35 ip netns exec "${ns1}" ethtool -K veth1 tso off
37 ip -netns "${ns1}" link set veth1 up
38 ip -netns "${ns2}" link set veth2 up
40 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1
41 ip -netns "${ns2}" -4 addr add "${ns2_v4}/24" dev veth2
42 ip -netns "
[all...]
/linux-master/tools/include/uapi/linux/
H A Dbpf.h3673 * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
3676 * network namespace *netns*. The return value must be checked,
3690 * If the *netns* is a negative signed 32-bit integer, then the
3691 * socket lookup table in the netns associated with the *ctx*
3692 * will be used. For the TC hooks, this is the netns of the device
3693 * in the skb. For socket hooks, this is the netns of the socket.
3694 * If *netns* is any other signed 32-bit value greater than or
3695 * equal to zero then it specifies the ID of the netns relative to
3696 * the netns associated with the *ctx*. *netns* value
6659 } netns; member in union:bpf_link_info::__anon3568
[all...]
/linux-master/tools/bpf/bpftool/
H A Dlink.c515 info->netns.netns_ino);
516 show_link_attach_type_json(info->netns.attach_type, json_wtr);
906 printf("\n\tnetns_ino %u ", info->netns.netns_ino);
907 show_link_attach_type_plain(info->netns.attach_type);
/linux-master/net/xfrm/
H A Dxfrm_interface_core.c46 #include <net/netns/generic.h>
/linux-master/net/wireless/
H A Dnl80211.c68 struct net *netns, struct nlattr **attrs)
112 if (wiphy_net(&rdev->wiphy) != netns)
140 __cfg80211_rdev_from_attrs(struct net *netns, struct nlattr **attrs) argument
183 netdev = __dev_get_by_index(netns, ifindex);
206 if (netns != wiphy_net(&rdev->wiphy))
220 cfg80211_get_dev_from_info(struct net *netns, struct genl_info *info) argument
222 return __cfg80211_rdev_from_attrs(netns, info->attrs);
67 __cfg80211_wdev_from_attrs(struct cfg80211_registered_device *rdev, struct net *netns, struct nlattr **attrs) argument

Completed in 267 milliseconds

1234567891011>>