From: Roy Marples Date: Fri, 7 Feb 2025 12:08:31 +0000 (+0000) Subject: IPv6: Abort ND when roaming X-Git-Tag: v10.2.0~12 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=846fb4a4d2973813d2fb14ac8d3db6b24e839a2b;p=thirdparty%2Fdhcpcd.git IPv6: Abort ND when roaming --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 00a80c7a..2503c39e 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -723,6 +723,9 @@ dhcpcd_nocarrier_roaming(struct interface *ifp) #ifdef INET dhcp_abort(ifp); #endif +#ifdef INET6 + ipv6nd_abort(ifp); +#endif #ifdef DHCP6 dhcp6_abort(ifp); #endif diff --git a/src/ipv6nd.c b/src/ipv6nd.c index b1bdfecb..4e1a536e 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -2053,6 +2053,15 @@ ipv6nd_startrs(struct interface *ifp) ipv6nd_startrs1(ifp); } +void +ipv6nd_abort(struct interface *ifp) +{ + + eloop_timeout_delete(ifp->ctx->eloop, ipv6nd_startrs1, ifp); + eloop_timeout_delete(ifp->ctx->eloop, ipv6nd_startrs2, ifp); + eloop_timeout_delete(ifp->ctx->eloop, ipv6nd_sendrsprobe, ifp); +} + static struct routeinfo *routeinfo_findalloc(struct ra *rap, const struct in6_addr *prefix, uint8_t prefix_len) { struct routeinfo *ri; diff --git a/src/ipv6nd.h b/src/ipv6nd.h index 51bf0353..1df7887f 100644 --- a/src/ipv6nd.h +++ b/src/ipv6nd.h @@ -142,6 +142,7 @@ void ipv6nd_advertise(struct ipv6_addr *); void ipv6nd_startexpire(struct interface *); void ipv6nd_drop(struct interface *); void ipv6nd_neighbour(struct dhcpcd_ctx *, struct in6_addr *, bool); +void ipv6nd_abort(struct interface *); #endif /* INET6 */ #endif /* IPV6ND_H */