Lines Matching +full:route +full:- +full:up

2 # SPDX-License-Identifier: GPL-2.0
34 head -n 1 $outfile | grep -q "rt_offload_failed"
35 if [[ $? -eq 0 ]]; then
39 head -n 2 $outfile | tail -n 1 | grep -q "rt_offload_failed"
49 head -n 1 $outfile | grep -q "rt_trap"
50 if [[ $? -eq 0 ]]; then
54 head -n 2 $outfile | tail -n 1 | grep -q "rt_trap"
61 local offload_failed=${1:-0}; shift
64 lines=`wc -l $outfile | cut "-d " -f1`
65 test $lines -eq $expected_num_lines
68 if [[ $expected_num_lines -eq 1 ]]; then
72 if [[ $offload_failed -eq 0 ]]; then
85 local route=$1; shift
87 local offload_failed=${1:-0}; shift
89 ip netns exec testns1 sysctl -qw net.$ip.fib_notify_on_flag_change=$notify
93 $IP monitor route &> $outfile &
95 $IP route add $route dev dummy1
100 rm -f $outfile
102 $IP route del $route dev dummy1
110 local route=192.0.2.0/24
113 # route.
117 route_addition_check $ip $notify $route $expected_num_notifications
119 # Make sure two notifications will be emitted for the programmed route.
122 route_addition_check $ip $notify $route $expected_num_notifications
124 # notify=2 means emit notifications only for failed route installation,
126 # route.
129 route_addition_check $ip $notify $route $expected_num_notifications
131 log_test "IPv4 route addition"
138 local route=$1; shift
141 ip netns exec testns1 sysctl -qw net.$ip.fib_notify_on_flag_change=$notify
142 $IP route add $route dev dummy1
147 $IP monitor route &> $outfile &
149 $IP route del $route dev dummy1
154 rm -f $outfile
162 local route=192.0.2.0/24
165 # Make sure a single notification will be emitted for the deleted route,
169 route_deletion_check $ip $notify $route $expected_num_notifications
172 route_deletion_check $ip $notify $route $expected_num_notifications
174 log_test "IPv4 route deletion"
181 local route=$1; shift
184 ip netns exec testns1 sysctl -qw net.$ip.fib_notify_on_flag_change=$notify
185 $IP route add $route dev dummy1
190 $IP monitor route &> $outfile &
192 $IP route replace $route dev dummy2
197 rm -f $outfile
199 $IP route del $route dev dummy2
207 local route=192.0.2.0/24
210 $IP link set dev dummy2 up
212 # Make sure a single notification will be emitted for the new route.
216 route_replacement_check $ip $notify $route $expected_num_notifications
218 # Make sure two notifications will be emitted for the new route.
221 route_replacement_check $ip $notify $route $expected_num_notifications
223 # notify=2 means emit notifications only for failed route installation,
224 # make sure a single notification will be emitted for the new route.
227 route_replacement_check $ip $notify $route $expected_num_notifications
231 log_test "IPv4 route replacement"
240 local route=192.0.2.0/24
244 check_err $? "Failed to setup route offload to fail"
247 # route.
250 route_addition_check $ip $notify $route $expected_num_notifications \
253 # Make sure two notifications will be emitted for the new route.
256 route_addition_check $ip $notify $route $expected_num_notifications \
259 # notify=2 means emit notifications only for failed route installation,
260 # make sure two notifications will be emitted for the new route.
263 route_addition_check $ip $notify $route $expected_num_notifications \
267 check_err $? "Failed to setup route offload not to fail"
269 log_test "IPv4 route offload failed"
277 local route=2001:db8:1::/64
280 # route.
283 route_addition_check $ip $notify $route $expected_num_notifications
285 # Make sure two notifications will be emitted for the programmed route.
288 route_addition_check $ip $notify $route $expected_num_notifications
290 # notify=2 means emit notifications only for failed route installation,
292 # route.
295 route_addition_check $ip $notify $route $expected_num_notifications
297 log_test "IPv6 route addition"
305 local route=2001:db8:1::/64
308 # Make sure a single notification will be emitted for the deleted route,
311 route_deletion_check $ip $notify $route $expected_num_notifications
314 route_deletion_check $ip $notify $route $expected_num_notifications
316 log_test "IPv6 route deletion"
324 local route=2001:db8:1::/64
327 $IP link set dev dummy2 up
329 # Make sure a single notification will be emitted for the new route.
332 route_replacement_check $ip $notify $route $expected_num_notifications
334 # Make sure two notifications will be emitted for the new route.
337 route_replacement_check $ip $notify $route $expected_num_notifications
339 # notify=2 means emit notifications only for failed route installation,
340 # make sure a single notification will be emitted for the new route.
343 route_replacement_check $ip $notify $route $expected_num_notifications
347 log_test "IPv6 route replacement"
356 local route=2001:db8:1::/64
360 check_err $? "Failed to setup route offload to fail"
363 # route.
366 route_addition_check $ip $notify $route $expected_num_notifications \
369 # Make sure two notifications will be emitted for the new route.
372 route_addition_check $ip $notify $route $expected_num_notifications \
375 # notify=2 means emit notifications only for failed route installation,
376 # make sure two notifications will be emitted for the new route.
379 route_addition_check $ip $notify $route $expected_num_notifications \
383 check_err $? "Failed to setup route offload not to fail"
385 log_test "IPv6 route offload failed"
392 while [ ! -d $SYSFS_NET_DIR ] ; do :; done
396 if [ $? -ne 0 ]; then
403 if [ $? -ne 0 ]; then
408 IP="ip -n testns1"
411 $IP link set dev dummy1 up
421 modprobe -r netdevsim &> /dev/null