summaryrefslogtreecommitdiffstats
path: root/if-bsd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-11-19 10:17:07 +0000
committerRoy Marples <roy@marples.name>2016-11-19 10:17:07 +0000
commit2e59c4575995f6972e11910094a8a0b711e89693 (patch)
tree988b9423b747ec858dea318107560da21e14a7eb /if-bsd.c
parentfe1e33ed6ee70bc926492e9a2d097f2b2717946c (diff)
downloaddhcpcd-2e59c4575995f6972e11910094a8a0b711e89693.tar.xz
Only build the routing tables for the address family we are interested in.
Diffstat (limited to 'if-bsd.c')
-rw-r--r--if-bsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/if-bsd.c b/if-bsd.c
index ea6f9170..3cfba2d3 100644
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -567,7 +567,7 @@ if_copyrt(struct dhcpcd_ctx *ctx, struct rt *rt, const struct rt_msghdr *rtm)
}
int
-if_initrt(struct dhcpcd_ctx *ctx)
+if_initrt(struct dhcpcd_ctx *ctx, int af)
{
struct rt_msghdr *rtm;
int mib[6];
@@ -575,12 +575,12 @@ if_initrt(struct dhcpcd_ctx *ctx)
char *buf, *p, *end;
struct rt rt;
- rt_headclear(&ctx->kroutes);
+ rt_headclear(&ctx->kroutes, AF_UNSPEC);
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
mib[2] = 0;
- mib[3] = AF_UNSPEC;
+ mib[3] = af;
mib[4] = NET_RT_DUMP;
mib[5] = 0;