Merge pull request #16991 from benpicco/gnrc_ipv6_auto_subnets-fix

gnrc/ipv6_auto_subnets: set RIO priority to ZERO
This commit is contained in:
benpicco 2021-10-15 17:48:03 +02:00 committed by GitHub
commit 57a82ff23d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -216,7 +216,7 @@ gnrc_pktsnip_t *gnrc_ndp_opt_ri_build(const ipv6_addr_t *prefix,
ndp_opt_ri_t *ri_opt = pkt->data; ndp_opt_ri_t *ri_opt = pkt->data;
ri_opt->prefix_len = prefix_len; ri_opt->prefix_len = prefix_len;
ri_opt->flags = (flags & NDP_OPT_PI_FLAGS_MASK); ri_opt->flags = (flags & NDP_OPT_RI_FLAGS_MASK);
ri_opt->route_ltime = byteorder_htonl(route_ltime); ri_opt->route_ltime = byteorder_htonl(route_ltime);
/* Bits beyond prefix_len MUST be 0 */ /* Bits beyond prefix_len MUST be 0 */
ipv6_addr_set_unspecified(&ri_opt->prefix); ipv6_addr_set_unspecified(&ri_opt->prefix);

View File

@ -310,7 +310,7 @@ static void _configure_subnets(uint8_t subnets, uint8_t start_idx, gnrc_netif_t
/* add route information option with new subnet */ /* add route information option with new subnet */
tmp = gnrc_ndp_opt_ri_build(&new_prefix, new_prefix_len, valid_ltime, tmp = gnrc_ndp_opt_ri_build(&new_prefix, new_prefix_len, valid_ltime,
NDP_OPT_RI_FLAGS_PRF_NONE, ext_opts); NDP_OPT_RI_FLAGS_PRF_ZERO, ext_opts);
if (tmp == NULL) { if (tmp == NULL) {
DEBUG("auto_subnets: No space left in packet buffer. Not adding RIO\n"); DEBUG("auto_subnets: No space left in packet buffer. Not adding RIO\n");
} else { } else {
@ -320,8 +320,7 @@ static void _configure_subnets(uint8_t subnets, uint8_t start_idx, gnrc_netif_t
/* immediately send an RA with RIO */ /* immediately send an RA with RIO */
if (ext_opts) { if (ext_opts) {
gnrc_ndp_rtr_adv_send(upstream, NULL, gnrc_ndp_rtr_adv_send(upstream, NULL, NULL, true, ext_opts);
&ipv6_addr_all_nodes_link_local, true, ext_opts);
} else { } else {
DEBUG("auto_subnets: Options empty, not sending RA\n"); DEBUG("auto_subnets: Options empty, not sending RA\n");
} }