From 06aa65e1ba9788fd645a698290cf0339f42ba2ca Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 18 Dec 2018 11:42:36 +0100 Subject: [PATCH] gnrc_ipv6_nib: don't ignore PL for route When pinging to a prefix for which there is a prefix list entry on the node (so no next hop) but a default route, a packet to a non-existent address under that prefix results in the packet being forwarded to the default route instead. This fixes it, so the node tries address resolution on the interface the prefix list entry is associated to. --- sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c index 4c33f9d536..33fef48f87 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c @@ -594,8 +594,7 @@ int _nib_get_route(const ipv6_addr_t *dst, gnrc_pktsnip_t *pkt, (void *)pkt); _nib_offl_entry_t *offl = _nib_offl_get_match(dst); - if ((offl == NULL) || (offl->mode == _PL)) { - /* give default router precedence over PLE */ + if (offl == NULL) { _nib_dr_entry_t *router = _nib_drl_get_dr(); if ((router == NULL) && (offl == NULL)) {