From 0f4b283de0e12a560a5cb3614ef97be315f75a05 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 2 Nov 2025 06:44:27 +0000 Subject: [PATCH] NetBSD: Delete RTF_CONNECTED route when changing it. We need to flush anything dynamically created. --- src/route.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/route.c b/src/route.c index a31c4f73..32d132b1 100644 --- a/src/route.c +++ b/src/route.c @@ -64,6 +64,14 @@ (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; -- 2.47.3