From 8966c14f60b1ba0f0c46cc0bea3b92d3139900c1 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 23 May 2023 12:53:17 +0200 Subject: [PATCH] gnrc_ipv6_nib: set default RIO preference to zero Linux will ignore RIOs with preference NONE, so set the preference to zero instead. --- sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c | 2 +- .../gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c index a6797bfd61b0..fa2226aa871d 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-router.c @@ -267,7 +267,7 @@ static gnrc_pktsnip_t *_build_final_ext_opts(gnrc_netif_t *netif) gnrc_pktsnip_t *snip = gnrc_ndp_opt_ri_build(&entry->pfx, entry->pfx_len, valid_ltime, - NDP_OPT_RI_FLAGS_PRF_NONE, + NDP_OPT_RI_FLAGS_PRF_ZERO, ext_opts); if (snip != NULL) { ext_opts = snip; diff --git a/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c b/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c index e02a726003bc..9de3b37ed9bc 100644 --- a/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c +++ b/sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c @@ -1,3 +1,4 @@ + /* * Copyright (C) 2021 ML!PA Consulting GmbH * @@ -332,7 +333,7 @@ static bool _remove_old_prefix(gnrc_netif_t *netif, /* invalidate old prefix in RIO */ tmp = gnrc_ndp_opt_ri_build(&old_pfx, old_pfx_len, 0, - NDP_OPT_RI_FLAGS_PRF_NONE, *ext_opts); + NDP_OPT_RI_FLAGS_PRF_ZERO, *ext_opts); if (tmp) { *ext_opts = tmp; }