From 0e7b8d09d509af71b96343009aee0ac0253868c6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 15 Oct 2021 15:49:13 +0200 Subject: [PATCH] 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. --- sys/net/gnrc/network_layer/ndp/gnrc_ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c index c48490a27f..aa5acc7f87 100644 --- a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c +++ b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c @@ -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);