Lines Matching +full:4 +full:ns

15 # * Currently the kernel accepts addresses in 0/8 and 240/4 as valid.
26 # * Currently the kernel DOES NOT accept unicast use of any of 224/4.
31 # Kselftest framework requirement - SKIP code is 4.
32 ksft_skip=4
45 hide_output(){ exec 3>&1 4>&2 >/dev/null 2>/dev/null; }
46 show_output(){ exec >&3 2>&4; }
64 # Caller must set up foo-ns and bar-ns namespaces
68 ip -n foo-ns address add $1/$3 dev foo || return 1
69 ip -n foo-ns link set foo up || return 1
70 ip -n bar-ns address add $2/$3 dev bar || return 1
71 ip -n bar-ns link set bar up || return 1
73 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
74 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
76 nettest -B -N bar-ns -O foo-ns -r $1 || return 1
77 nettest -B -N foo-ns -O bar-ns -r $2 || return 1
91 # Caller must set up foo-ns, bar-ns, and router-ns
93 # (foo in foo-ns, foo1 and bar1 in router-ns, and
94 # bar in bar-ns).
96 ip -n foo-ns address add $1/$5 dev foo || return 1
97 ip -n foo-ns link set foo up || return 1
98 ip -n foo-ns route add default via $2 || return 1
99 ip -n bar-ns address add $4/$5 dev bar || return 1
100 ip -n bar-ns link set bar up || return 1
101 ip -n bar-ns route add default via $3 || return 1
102 ip -n router-ns address add $2/$5 dev foo1 || return 1
103 ip -n router-ns link set foo1 up || return 1
104 ip -n router-ns address add $3/$5 dev bar1 || return 1
105 ip -n router-ns link set bar1 up || return 1
107 echo 1 | ip netns exec router-ns tee /proc/sys/net/ipv4/ip_forward
109 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
110 ip netns exec foo-ns timeout 2 ping -c 1 $4 || return 1
111 ip netns exec bar-ns timeout 2 ping -c 1 $3 || return 1
112 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
114 nettest -B -N bar-ns -O foo-ns -r $1 || return 1
115 nettest -B -N foo-ns -O bar-ns -r $4 || return 1
124 ip netns add foo-ns
125 ip netns add bar-ns
126 ip link add foo netns foo-ns type veth peer name bar netns bar-ns
131 ip netns pids foo-ns | xargs -r kill -9
132 ip netns pids bar-ns | xargs -r kill -9
133 ip netns del foo-ns
134 ip netns del bar-ns
140 show_result $test_result "$4"
150 ip netns add foo-ns
151 ip netns add bar-ns
152 ip netns add router-ns
153 ip link add foo netns foo-ns type veth peer name foo1 netns router-ns
154 ip link add bar netns bar-ns type veth peer name bar1 netns router-ns
159 ip netns pids foo-ns | xargs -r kill -9
160 ip netns pids bar-ns | xargs -r kill -9
161 ip netns pids router-ns | xargs -r kill -9
162 ip netns del foo-ns
163 ip netns del bar-ns
164 ip netns del router-ns
177 # Test support for 240/4
178 segmenttest 240.1.2.1 240.1.2.4 24 "assign and ping within 240/4 (1 of 2) (is allowed)"
179 segmenttest 250.100.2.1 250.100.30.4 16 "assign and ping within 240/4 (2 of 2) (is allowed)"