From 05f3894b4b67ac8057ad4c81fd34e9286a1fa59f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 7 Jun 2026 10:04:31 +0100 Subject: [PATCH] route: Use HAVE_RT_MISSFILTER rather than a generic BSD define --- src/route.c | 6 +++--- src/route.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/route.c b/src/route.c index 5a3957fc..20d82d79 100644 --- a/src/route.c +++ b/src/route.c @@ -802,7 +802,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af) goto getfail; #endif -#ifdef BSD +#ifdef HAVE_RT_MISSFILTER /* Rewind the miss filter */ ctx->rt_missfilterlen = 0; #endif @@ -814,7 +814,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af) continue; } else if (!(ctx->options & DHCPCD_CONFIGURE)) continue; -#ifdef BSD +#ifdef HAVE_RT_MISSFILTER if (rt_is_default(rt) && if_missfilter(rt->rt_ifp, rt->rt_gateway) == -1) logerr("if_missfilter"); @@ -837,7 +837,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af) } } -#ifdef BSD +#ifdef HAVE_RT_MISSFILTER if (!(ctx->options & DHCPCD_EXITING) && if_missfilter_apply(ctx) == -1 && errno != ENOTSUP) logerr("if_missfilter_apply"); diff --git a/src/route.h b/src/route.h index 62bfa511..e43d1e69 100644 --- a/src/route.h +++ b/src/route.h @@ -73,6 +73,10 @@ #endif #endif +#if defined(BSD) +#define HAVE_RT_MISSFILTER +#endif + #if defined(__OpenBSD__) || defined(__sun) #define ROUTE_PER_GATEWAY /* XXX dhcpcd doesn't really support this yet.