Lines Matching +full:0 +full:ns

15 # * Currently the kernel accepts addresses in 0/8 and 240/4 as valid.
43 result=0
49 if [ $1 -eq 0 ]; then
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
79 return 0
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
117 return 0
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
128 test_result=0
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
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
156 test_result=0
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
181 # Test support for 0/8
182 segmenttest 0.1.2.17 0.1.2.23 24 "assign and ping within 0/8 (1 of 2) (is allowed)"
183 segmenttest 0.77.240.17 0.77.2.23 16 "assign and ping within 0/8 (2 of 2) (is allowed)"
195 # Test support for lowest address ending in .0
198 # Test support for lowest address not ending in .0