]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
NetBSD: Delete RTF_CONNECTED route when changing it.
authorRoy Marples <roy@marples.name>
Sun, 2 Nov 2025 06:44:27 +0000 (06:44 +0000)
committerRoy Marples <roy@marples.name>
Sun, 2 Nov 2025 06:46:48 +0000 (06:46 +0000)
We need to flush anything dynamically created.

src/route.c

index a31c4f730e09c62d7c6c716e53dac2fda7b8e40d..32d132b1e331114868ac9a42bb5b999f7c471a73 100644 (file)
         (N) = (S))
 #endif
 
+/*
+ * For our purposes, RTF_CONNECTED is the same as RTF_CLONING.
+ * If we change the route, we want to flush anything dynamically created.
+ */
+#if defined(BSD) && !defined(RTF_CLONING) && defined(RTF_CONNECTED)
+#define        RTF_CLONING     RTF_CONNECTED
+#endif
+
 #ifdef RT_FREE_ROUTE_TABLE_STATS
 static size_t croutes;
 static size_t nroutes;