]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv6: Abort ND when roaming
authorRoy Marples <roy@marples.name>
Fri, 7 Feb 2025 12:08:31 +0000 (12:08 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2025 12:08:31 +0000 (12:08 +0000)
src/dhcpcd.c
src/ipv6nd.c
src/ipv6nd.h

index 00a80c7a66d990c9941a5d7d03c567a452be1b16..2503c39e4eb850c844e349299799563d8d9a77c0 100644 (file)
@@ -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
index b1bdfecb345a0a9ea1366d72eb85f3afdb715ab9..4e1a536eab24c6f1a3130905c0c4939afd5a7f0b 100644 (file)
@@ -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;
index 51bf0353e5f1fd5e740059717485ee46395209b7..1df7887f1d0e9e8b697ce589a055da2aabe07271 100644 (file)
@@ -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 */