Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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");
Expand All @@ -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");
Expand Down
4 changes: 4 additions & 0 deletions src/route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down