* [PATCH 4/8] netconfig: In netconfig_find_icmp6_route check protocol is RTPROT_RA
@ 2022-04-15 18:32 Andrew Zaborowski
0 siblings, 0 replies; only message in thread
From: Andrew Zaborowski @ 2022-04-15 18:32 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
Since we're interested only in routes from icmp6 (Router Advertisements)
we can check that the route's protocol is RTPROT_RA before following
with other checks.
---
I'll merge this into the original ICMP6 handling patch if/when I'm resending
that one.
ell/netconfig.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ell/netconfig.c b/ell/netconfig.c
index eb74aa5..5db159d 100644
--- a/ell/netconfig.c
+++ b/ell/netconfig.c
@@ -371,7 +371,8 @@ static struct l_rtnl_route *netconfig_find_icmp6_route(
const uint8_t *route_dst;
uint8_t route_prefix_len = 0;
- if (l_rtnl_route_get_family(route) != AF_INET6)
+ if (l_rtnl_route_get_family(route) != AF_INET6 ||
+ l_rtnl_route_get_protocol(route) != RTPROT_RA)
continue;
route_gateway = l_rtnl_route_get_gateway_in_addr(route);
--
2.32.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-15 18:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 18:32 [PATCH 4/8] netconfig: In netconfig_find_icmp6_route check protocol is RTPROT_RA Andrew Zaborowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.