1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_ipv6_nib: fix setting RIO flags

We have to use NDP_OPT_RI_FLAGS_MASK, not NDP_OPT_PI_FLAGS_MASK.
This fixes flags always being 0.
This commit is contained in:
Benjamin Valentin 2021-10-15 15:49:13 +02:00
parent 32be74291c
commit 0e7b8d09d5

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;
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);
/* Bits beyond prefix_len MUST be 0 */
ipv6_addr_set_unspecified(&ri_opt->prefix);