From: Roy Marples Date: Sun, 2 Nov 2025 06:44:27 +0000 (+0000) Subject: NetBSD: Delete RTF_CONNECTED route when changing it. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f4b283de0e12a560a5cb3614ef97be315f75a05;p=thirdparty%2Fdhcpcd.git NetBSD: Delete RTF_CONNECTED route when changing it. We need to flush anything dynamically created. --- 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;