From c33799223639782cd807198eab73d9065b870407 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 12 Sep 2023 10:32:16 +0200 Subject: [PATCH] net/gnrc/rpl: enable RTR_ADV on RPL interface --- sys/net/gnrc/routing/rpl/gnrc_rpl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl.c b/sys/net/gnrc/routing/rpl/gnrc_rpl.c index f2b0f3749d..383637b295 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl.c @@ -122,10 +122,15 @@ kernel_pid_t gnrc_rpl_init(kernel_pid_t if_pid) } /* register all_RPL_nodes multicast address */ - gnrc_netif_ipv6_group_join_internal(gnrc_netif_get_by_pid(if_pid), - &ipv6_addr_all_rpl_nodes); + gnrc_netif_t *netif = gnrc_netif_get_by_pid(if_pid); + gnrc_netif_ipv6_group_join_internal(netif, &ipv6_addr_all_rpl_nodes); + /* send DODAG Information Solicitation */ gnrc_rpl_send_DIS(NULL, (ipv6_addr_t *) &ipv6_addr_all_rpl_nodes, NULL, 0); + + /* RPL enables routing, start advertising ourself as a router */ + gnrc_ipv6_nib_change_rtr_adv_iface(netif, true); + return gnrc_rpl_pid; }