Skip to content

Commit 840f56d

Browse files
authored
route: Use HAVE_RT_MISSFILTER rather than a generic BSD define
1 parent a0bd514 commit 840f56d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/route.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af)
802802
goto getfail;
803803
#endif
804804

805-
#ifdef BSD
805+
#ifdef HAVE_RT_MISSFILTER
806806
/* Rewind the miss filter */
807807
ctx->rt_missfilterlen = 0;
808808
#endif
@@ -814,7 +814,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af)
814814
continue;
815815
} else if (!(ctx->options & DHCPCD_CONFIGURE))
816816
continue;
817-
#ifdef BSD
817+
#ifdef HAVE_RT_MISSFILTER
818818
if (rt_is_default(rt) &&
819819
if_missfilter(rt->rt_ifp, rt->rt_gateway) == -1)
820820
logerr("if_missfilter");
@@ -837,7 +837,7 @@ rt_build(struct dhcpcd_ctx *ctx, int af)
837837
}
838838
}
839839

840-
#ifdef BSD
840+
#ifdef HAVE_RT_MISSFILTER
841841
if (!(ctx->options & DHCPCD_EXITING) &&
842842
if_missfilter_apply(ctx) == -1 && errno != ENOTSUP)
843843
logerr("if_missfilter_apply");

src/route.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
#endif
7474
#endif
7575

76+
#if defined(BSD)
77+
#define HAVE_RT_MISSFILTER
78+
#endif
79+
7680
#if defined(__OpenBSD__) || defined(__sun)
7781
#define ROUTE_PER_GATEWAY
7882
/* XXX dhcpcd doesn't really support this yet.

0 commit comments

Comments
 (0)