aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-28 20:47:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-28 20:47:33 -0400
commit02dc96ef6c25f990452c114c59d75c368a1f4c8f (patch)
treebddda0591191f65931195d3171743507d6cae7d6 /tools
parentedf445ad7c8d58c2784a5b733790e80999093d8f (diff)
parentfaeacb6ddb13b7a020b50b9246fe098653cfbd6e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Sanity check URB networking device parameters to avoid divide by zero, from Oliver Neukum. 2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6 don't work properly. Longer term this needs a better fix tho. From Vijay Khemka. 3) Small fixes to selftests (use ping when ping6 is not present, etc.) from David Ahern. 4) Bring back rt_uses_gateway member of struct rtable, it's semantics were not well understood and trying to remove it broke things. From David Ahern. 5) Move usbnet snaity checking, ignore endpoints with invalid wMaxPacketSize. From Bjørn Mork. 6) Missing Kconfig deps for sja1105 driver, from Mao Wenan. 7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel, Alex Vesker, and Yevgeny Kliteynik 8) Missing CAP_NET_RAW checks in various places, from Ori Nimron. 9) Fix crash when removing sch_cbs entry while offloading is enabled, from Vinicius Costa Gomes. 10) Signedness bug fixes, generally in looking at the result given by of_get_phy_mode() and friends. From Dan Crapenter. 11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet. 12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern. 13) Fix quantization code in tcp_bbr, from Kevin Yang. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits) net: tap: clean up an indentation issue nfp: abm: fix memory leak in nfp_abm_u32_knode_replace tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state sk_buff: drop all skb extensions on free and skb scrubbing tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions Documentation: Clarify trap's description mlxsw: spectrum: Clear VLAN filters during port initialization net: ena: clean up indentation issue NFC: st95hf: clean up indentation issue net: phy: micrel: add Asym Pause workaround for KSZ9021 net: socionext: ave: Avoid using netdev_err() before calling register_netdev() ptp: correctly disable flags on old ioctls lib: dimlib: fix help text typos net: dsa: microchip: Always set regmap stride to 1 nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled net: sched: sch_sfb: don't call qdisc_put() while holding tree lock ...
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/bpf/btf_dump.c94
-rw-r--r--tools/lib/bpf/xsk.c11
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tcp_rtt.c21
-rw-r--r--tools/testing/selftests/bpf/progs/strobemeta.h5
-rw-r--r--tools/testing/selftests/bpf/test_sysctl.c1
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh7
-rwxr-xr-xtools/testing/selftests/net/fib_nexthop_multiprefix.sh6
-rwxr-xr-xtools/testing/selftests/net/fib_nexthops.sh14
-rwxr-xr-xtools/testing/selftests/net/fib_tests.sh21
9 files changed, 148 insertions, 32 deletions
diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c
index 715967762312..ede55fec3618 100644
--- a/tools/lib/bpf/btf_dump.c
+++ b/tools/lib/bpf/btf_dump.c
@@ -48,6 +48,8 @@ struct btf_dump_type_aux_state {
48 __u8 fwd_emitted: 1; 48 __u8 fwd_emitted: 1;
49 /* whether unique non-duplicate name was already assigned */ 49 /* whether unique non-duplicate name was already assigned */
50 __u8 name_resolved: 1; 50 __u8 name_resolved: 1;
51 /* whether type is referenced from any other type */
52 __u8 referenced: 1;
51}; 53};
52 54
53struct btf_dump { 55struct btf_dump {
@@ -173,6 +175,7 @@ void btf_dump__free(struct btf_dump *d)
173 free(d); 175 free(d);
174} 176}
175 177
178static int btf_dump_mark_referenced(struct btf_dump *d);
176static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr); 179static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr);
177static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id); 180static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id);
178 181
@@ -213,6 +216,11 @@ int btf_dump__dump_type(struct btf_dump *d, __u32 id)
213 /* VOID is special */ 216 /* VOID is special */
214 d->type_states[0].order_state = ORDERED; 217 d->type_states[0].order_state = ORDERED;
215 d->type_states[0].emit_state = EMITTED; 218 d->type_states[0].emit_state = EMITTED;
219
220 /* eagerly determine referenced types for anon enums */
221 err = btf_dump_mark_referenced(d);
222 if (err)
223 return err;
216 } 224 }
217 225
218 d->emit_queue_cnt = 0; 226 d->emit_queue_cnt = 0;
@@ -226,6 +234,79 @@ int btf_dump__dump_type(struct btf_dump *d, __u32 id)
226 return 0; 234 return 0;
227} 235}
228 236
237/*
238 * Mark all types that are referenced from any other type. This is used to
239 * determine top-level anonymous enums that need to be emitted as an
240 * independent type declarations.
241 * Anonymous enums come in two flavors: either embedded in a struct's field
242 * definition, in which case they have to be declared inline as part of field
243 * type declaration; or as a top-level anonymous enum, typically used for
244 * declaring global constants. It's impossible to distinguish between two
245 * without knowning whether given enum type was referenced from other type:
246 * top-level anonymous enum won't be referenced by anything, while embedded
247 * one will.
248 */
249static int btf_dump_mark_referenced(struct btf_dump *d)
250{
251 int i, j, n = btf__get_nr_types(d->btf);
252 const struct btf_type *t;
253 __u16 vlen;
254
255 for (i = 1; i <= n; i++) {
256 t = btf__type_by_id(d->btf, i);
257 vlen = btf_vlen(t);
258
259 switch (btf_kind(t)) {
260 case BTF_KIND_INT:
261 case BTF_KIND_ENUM:
262 case BTF_KIND_FWD:
263 break;
264
265 case BTF_KIND_VOLATILE:
266 case BTF_KIND_CONST:
267 case BTF_KIND_RESTRICT:
268 case BTF_KIND_PTR:
269 case BTF_KIND_TYPEDEF:
270 case BTF_KIND_FUNC:
271 case BTF_KIND_VAR:
272 d->type_states[t->type].referenced = 1;
273 break;
274
275 case BTF_KIND_ARRAY: {
276 const struct btf_array *a = btf_array(t);
277
278 d->type_states[a->index_type].referenced = 1;
279 d->type_states[a->type].referenced = 1;
280 break;
281 }
282 case BTF_KIND_STRUCT:
283 case BTF_KIND_UNION: {
284 const struct btf_member *m = btf_members(t);
285
286 for (j = 0; j < vlen; j++, m++)
287 d->type_states[m->type].referenced = 1;
288 break;
289 }
290 case BTF_KIND_FUNC_PROTO: {
291 const struct btf_param *p = btf_params(t);
292
293 for (j = 0; j < vlen; j++, p++)
294 d->type_states[p->type].referenced = 1;
295 break;
296 }
297 case BTF_KIND_DATASEC: {
298 const struct btf_var_secinfo *v = btf_var_secinfos(t);
299
300 for (j = 0; j < vlen; j++, v++)
301 d->type_states[v->type].referenced = 1;
302 break;
303 }
304 default:
305 return -EINVAL;
306 }
307 }
308 return 0;
309}
229static int btf_dump_add_emit_queue_id(struct btf_dump *d, __u32 id) 310static int btf_dump_add_emit_queue_id(struct btf_dump *d, __u32 id)
230{ 311{
231 __u32 *new_queue; 312 __u32 *new_queue;
@@ -395,7 +476,12 @@ static int btf_dump_order_type(struct btf_dump *d, __u32 id, bool through_ptr)
395 } 476 }
396 case BTF_KIND_ENUM: 477 case BTF_KIND_ENUM:
397 case BTF_KIND_FWD: 478 case BTF_KIND_FWD:
398 if (t->name_off != 0) { 479 /*
480 * non-anonymous or non-referenced enums are top-level
481 * declarations and should be emitted. Same logic can be
482 * applied to FWDs, it won't hurt anyways.
483 */
484 if (t->name_off != 0 || !tstate->referenced) {
399 err = btf_dump_add_emit_queue_id(d, id); 485 err = btf_dump_add_emit_queue_id(d, id);
400 if (err) 486 if (err)
401 return err; 487 return err;
@@ -536,11 +622,6 @@ static void btf_dump_emit_type(struct btf_dump *d, __u32 id, __u32 cont_id)
536 t = btf__type_by_id(d->btf, id); 622 t = btf__type_by_id(d->btf, id);
537 kind = btf_kind(t); 623 kind = btf_kind(t);
538 624
539 if (top_level_def && t->name_off == 0) {
540 pr_warning("unexpected nameless definition, id:[%u]\n", id);
541 return;
542 }
543
544 if (tstate->emit_state == EMITTING) { 625 if (tstate->emit_state == EMITTING) {
545 if (tstate->fwd_emitted) 626 if (tstate->fwd_emitted)
546 return; 627 return;
@@ -1167,6 +1248,7 @@ static void btf_dump_emit_type_chain(struct btf_dump *d,
1167 return; 1248 return;
1168 } 1249 }
1169 1250
1251 next_id = decls->ids[decls->cnt - 1];
1170 next_t = btf__type_by_id(d->btf, next_id); 1252 next_t = btf__type_by_id(d->btf, next_id);
1171 multidim = btf_is_array(next_t); 1253 multidim = btf_is_array(next_t);
1172 /* we need space if we have named non-pointer */ 1254 /* we need space if we have named non-pointer */
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
index 842c4fd55859..24fa313524fb 100644
--- a/tools/lib/bpf/xsk.c
+++ b/tools/lib/bpf/xsk.c
@@ -65,7 +65,6 @@ struct xsk_socket {
65 int xsks_map_fd; 65 int xsks_map_fd;
66 __u32 queue_id; 66 __u32 queue_id;
67 char ifname[IFNAMSIZ]; 67 char ifname[IFNAMSIZ];
68 bool zc;
69}; 68};
70 69
71struct xsk_nl_info { 70struct xsk_nl_info {
@@ -491,7 +490,6 @@ int xsk_socket__create(struct xsk_socket **xsk_ptr, const char *ifname,
491 void *rx_map = NULL, *tx_map = NULL; 490 void *rx_map = NULL, *tx_map = NULL;
492 struct sockaddr_xdp sxdp = {}; 491 struct sockaddr_xdp sxdp = {};
493 struct xdp_mmap_offsets off; 492 struct xdp_mmap_offsets off;
494 struct xdp_options opts;
495 struct xsk_socket *xsk; 493 struct xsk_socket *xsk;
496 socklen_t optlen; 494 socklen_t optlen;
497 int err; 495 int err;
@@ -611,15 +609,6 @@ int xsk_socket__create(struct xsk_socket **xsk_ptr, const char *ifname,
611 609
612 xsk->prog_fd = -1; 610 xsk->prog_fd = -1;
613 611
614 optlen = sizeof(opts);
615 err = getsockopt(xsk->fd, SOL_XDP, XDP_OPTIONS, &opts, &optlen);
616 if (err) {
617 err = -errno;
618 goto out_mmap_tx;
619 }
620
621 xsk->zc = opts.flags & XDP_OPTIONS_ZEROCOPY;
622
623 if (!(xsk->config.libbpf_flags & XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD)) { 612 if (!(xsk->config.libbpf_flags & XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD)) {
624 err = xsk_setup_xdp_prog(xsk); 613 err = xsk_setup_xdp_prog(xsk);
625 if (err) 614 if (err)
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
index fdc0b3614a9e..a82da555b1b0 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
@@ -203,14 +203,24 @@ static int start_server(void)
203 return fd; 203 return fd;
204} 204}
205 205
206static pthread_mutex_t server_started_mtx = PTHREAD_MUTEX_INITIALIZER;
207static pthread_cond_t server_started = PTHREAD_COND_INITIALIZER;
208
206static void *server_thread(void *arg) 209static void *server_thread(void *arg)
207{ 210{
208 struct sockaddr_storage addr; 211 struct sockaddr_storage addr;
209 socklen_t len = sizeof(addr); 212 socklen_t len = sizeof(addr);
210 int fd = *(int *)arg; 213 int fd = *(int *)arg;
211 int client_fd; 214 int client_fd;
215 int err;
216
217 err = listen(fd, 1);
218
219 pthread_mutex_lock(&server_started_mtx);
220 pthread_cond_signal(&server_started);
221 pthread_mutex_unlock(&server_started_mtx);
212 222
213 if (CHECK_FAIL(listen(fd, 1)) < 0) { 223 if (CHECK_FAIL(err < 0)) {
214 perror("Failed to listed on socket"); 224 perror("Failed to listed on socket");
215 return NULL; 225 return NULL;
216 } 226 }
@@ -248,7 +258,14 @@ void test_tcp_rtt(void)
248 if (CHECK_FAIL(server_fd < 0)) 258 if (CHECK_FAIL(server_fd < 0))
249 goto close_cgroup_fd; 259 goto close_cgroup_fd;
250 260
251 pthread_create(&tid, NULL, server_thread, (void *)&server_fd); 261 if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
262 (void *)&server_fd)))
263 goto close_cgroup_fd;
264
265 pthread_mutex_lock(&server_started_mtx);
266 pthread_cond_wait(&server_started, &server_started_mtx);
267 pthread_mutex_unlock(&server_started_mtx);
268
252 CHECK_FAIL(run_test(cgroup_fd, server_fd)); 269 CHECK_FAIL(run_test(cgroup_fd, server_fd));
253 close(server_fd); 270 close(server_fd);
254close_cgroup_fd: 271close_cgroup_fd:
diff --git a/tools/testing/selftests/bpf/progs/strobemeta.h b/tools/testing/selftests/bpf/progs/strobemeta.h
index 8a399bdfd920..067eb625d01c 100644
--- a/tools/testing/selftests/bpf/progs/strobemeta.h
+++ b/tools/testing/selftests/bpf/progs/strobemeta.h
@@ -413,7 +413,10 @@ static __always_inline void *read_map_var(struct strobemeta_cfg *cfg,
413#else 413#else
414#pragma unroll 414#pragma unroll
415#endif 415#endif
416 for (int i = 0; i < STROBE_MAX_MAP_ENTRIES && i < map.cnt; ++i) { 416 for (int i = 0; i < STROBE_MAX_MAP_ENTRIES; ++i) {
417 if (i >= map.cnt)
418 break;
419
417 descr->key_lens[i] = 0; 420 descr->key_lens[i] = 0;
418 len = bpf_probe_read_str(payload, STROBE_MAX_STR_LEN, 421 len = bpf_probe_read_str(payload, STROBE_MAX_STR_LEN,
419 map.entries[i].key); 422 map.entries[i].key);
diff --git a/tools/testing/selftests/bpf/test_sysctl.c b/tools/testing/selftests/bpf/test_sysctl.c
index 4f8ec1f10a80..a320e3844b17 100644
--- a/tools/testing/selftests/bpf/test_sysctl.c
+++ b/tools/testing/selftests/bpf/test_sysctl.c
@@ -1385,7 +1385,6 @@ static int fixup_sysctl_value(const char *buf, size_t buf_len,
1385 uint8_t raw[sizeof(uint64_t)]; 1385 uint8_t raw[sizeof(uint64_t)];
1386 uint64_t num; 1386 uint64_t num;
1387 } value = {}; 1387 } value = {};
1388 uint8_t c, i;
1389 1388
1390 if (buf_len > sizeof(value)) { 1389 if (buf_len > sizeof(value)) {
1391 log_err("Value is too big (%zd) to use in fixup", buf_len); 1390 log_err("Value is too big (%zd) to use in fixup", buf_len);
diff --git a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh
index 5dcdfa20fc6c..126caf28b529 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh
@@ -224,13 +224,6 @@ ingress_vlan_filter_test()
224 local vid=10 224 local vid=10
225 225
226 bridge vlan add vid $vid dev $swp2 master 226 bridge vlan add vid $vid dev $swp2 master
227 # During initialization the firmware enables all the VLAN filters and
228 # the driver does not turn them off since the traffic will be discarded
229 # by the STP filter whose default is DISCARD state. Add the VID on the
230 # ingress bridge port and then remove it to make sure it is not member
231 # in the VLAN.
232 bridge vlan add vid $vid dev $swp1 master
233 bridge vlan del vid $vid dev $swp1 master
234 227
235 RET=0 228 RET=0
236 229
diff --git a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
index e6828732843e..9dc35a16e415 100755
--- a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
+++ b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
@@ -15,6 +15,8 @@
15PAUSE_ON_FAIL=no 15PAUSE_ON_FAIL=no
16VERBOSE=0 16VERBOSE=0
17 17
18which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping)
19
18################################################################################ 20################################################################################
19# helpers 21# helpers
20 22
@@ -200,7 +202,7 @@ validate_v6_exception()
200 local rc 202 local rc
201 203
202 if [ ${ping_sz} != "0" ]; then 204 if [ ${ping_sz} != "0" ]; then
203 run_cmd ip netns exec h0 ping6 -s ${ping_sz} -c5 -w5 ${dst} 205 run_cmd ip netns exec h0 ${ping6} -s ${ping_sz} -c5 -w5 ${dst}
204 fi 206 fi
205 207
206 if [ "$VERBOSE" = "1" ]; then 208 if [ "$VERBOSE" = "1" ]; then
@@ -243,7 +245,7 @@ do
243 run_cmd taskset -c ${c} ip netns exec h0 ping -c1 -w1 172.16.10${i}.1 245 run_cmd taskset -c ${c} ip netns exec h0 ping -c1 -w1 172.16.10${i}.1
244 [ $? -ne 0 ] && printf "\nERROR: ping to h${i} failed\n" && ret=1 246 [ $? -ne 0 ] && printf "\nERROR: ping to h${i} failed\n" && ret=1
245 247
246 run_cmd taskset -c ${c} ip netns exec h0 ping6 -c1 -w1 2001:db8:10${i}::1 248 run_cmd taskset -c ${c} ip netns exec h0 ${ping6} -c1 -w1 2001:db8:10${i}::1
247 [ $? -ne 0 ] && printf "\nERROR: ping6 to h${i} failed\n" && ret=1 249 [ $? -ne 0 ] && printf "\nERROR: ping6 to h${i} failed\n" && ret=1
248 250
249 [ $ret -ne 0 ] && break 251 [ $ret -ne 0 ] && break
diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
index f9ebeac1e6f2..796670ebc65b 100755
--- a/tools/testing/selftests/net/fib_nexthops.sh
+++ b/tools/testing/selftests/net/fib_nexthops.sh
@@ -940,6 +940,20 @@ basic()
940 run_cmd "$IP nexthop add id 104 group 1 dev veth1" 940 run_cmd "$IP nexthop add id 104 group 1 dev veth1"
941 log_test $? 2 "Nexthop group and device" 941 log_test $? 2 "Nexthop group and device"
942 942
943 # Tests to ensure that flushing works as expected.
944 run_cmd "$IP nexthop add id 105 blackhole proto 99"
945 run_cmd "$IP nexthop add id 106 blackhole proto 100"
946 run_cmd "$IP nexthop add id 107 blackhole proto 99"
947 run_cmd "$IP nexthop flush proto 99"
948 check_nexthop "id 105" ""
949 check_nexthop "id 106" "id 106 blackhole proto 100"
950 check_nexthop "id 107" ""
951 run_cmd "$IP nexthop flush proto 100"
952 check_nexthop "id 106" ""
953
954 run_cmd "$IP nexthop flush proto 100"
955 log_test $? 0 "Test proto flush"
956
943 run_cmd "$IP nexthop add id 104 group 1 blackhole" 957 run_cmd "$IP nexthop add id 104 group 1 blackhole"
944 log_test $? 2 "Nexthop group and blackhole" 958 log_test $? 2 "Nexthop group and blackhole"
945 959
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 4465fc2dae14..c4ba0ff4a53f 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -9,7 +9,7 @@ ret=0
9ksft_skip=4 9ksft_skip=4
10 10
11# all tests in this script. Can be overridden with -t option 11# all tests in this script. Can be overridden with -t option
12TESTS="unregister down carrier nexthop ipv6_rt ipv4_rt ipv6_addr_metric ipv4_addr_metric ipv6_route_metrics ipv4_route_metrics ipv4_route_v6_gw rp_filter" 12TESTS="unregister down carrier nexthop suppress ipv6_rt ipv4_rt ipv6_addr_metric ipv4_addr_metric ipv6_route_metrics ipv4_route_metrics ipv4_route_v6_gw rp_filter"
13 13
14VERBOSE=0 14VERBOSE=0
15PAUSE_ON_FAIL=no 15PAUSE_ON_FAIL=no
@@ -17,6 +17,8 @@ PAUSE=no
17IP="ip -netns ns1" 17IP="ip -netns ns1"
18NS_EXEC="ip netns exec ns1" 18NS_EXEC="ip netns exec ns1"
19 19
20which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping)
21
20log_test() 22log_test()
21{ 23{
22 local rc=$1 24 local rc=$1
@@ -614,6 +616,20 @@ fib_nexthop_test()
614 cleanup 616 cleanup
615} 617}
616 618
619fib_suppress_test()
620{
621 $IP link add dummy1 type dummy
622 $IP link set dummy1 up
623 $IP -6 route add default dev dummy1
624 $IP -6 rule add table main suppress_prefixlength 0
625 ping -f -c 1000 -W 1 1234::1 || true
626 $IP -6 rule del table main suppress_prefixlength 0
627 $IP link del dummy1
628
629 # If we got here without crashing, we're good.
630 return 0
631}
632
617################################################################################ 633################################################################################
618# Tests on route add and replace 634# Tests on route add and replace
619 635
@@ -1086,7 +1102,7 @@ ipv6_route_metrics_test()
1086 log_test $rc 0 "Multipath route with mtu metric" 1102 log_test $rc 0 "Multipath route with mtu metric"
1087 1103
1088 $IP -6 ro add 2001:db8:104::/64 via 2001:db8:101::2 mtu 1300 1104 $IP -6 ro add 2001:db8:104::/64 via 2001:db8:101::2 mtu 1300
1089 run_cmd "ip netns exec ns1 ping6 -w1 -c1 -s 1500 2001:db8:104::1" 1105 run_cmd "ip netns exec ns1 ${ping6} -w1 -c1 -s 1500 2001:db8:104::1"
1090 log_test $? 0 "Using route with mtu metric" 1106 log_test $? 0 "Using route with mtu metric"
1091 1107
1092 run_cmd "$IP -6 ro add 2001:db8:114::/64 via 2001:db8:101::2 congctl lock foo" 1108 run_cmd "$IP -6 ro add 2001:db8:114::/64 via 2001:db8:101::2 congctl lock foo"
@@ -1591,6 +1607,7 @@ do
1591 fib_carrier_test|carrier) fib_carrier_test;; 1607 fib_carrier_test|carrier) fib_carrier_test;;
1592 fib_rp_filter_test|rp_filter) fib_rp_filter_test;; 1608 fib_rp_filter_test|rp_filter) fib_rp_filter_test;;
1593 fib_nexthop_test|nexthop) fib_nexthop_test;; 1609 fib_nexthop_test|nexthop) fib_nexthop_test;;
1610 fib_suppress_test|suppress) fib_suppress_test;;
1594 ipv6_route_test|ipv6_rt) ipv6_route_test;; 1611 ipv6_route_test|ipv6_rt) ipv6_route_test;;
1595 ipv4_route_test|ipv4_rt) ipv4_route_test;; 1612 ipv4_route_test|ipv4_rt) ipv4_route_test;;
1596 ipv6_addr_metric) ipv6_addr_metric_test;; 1613 ipv6_addr_metric) ipv6_addr_metric_test;;