diff options
| author | Roy Marples <roy@marples.name> | 2016-11-19 10:17:07 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-11-19 10:17:07 +0000 |
| commit | 2e59c4575995f6972e11910094a8a0b711e89693 (patch) | |
| tree | 988b9423b747ec858dea318107560da21e14a7eb /if-bsd.c | |
| parent | fe1e33ed6ee70bc926492e9a2d097f2b2717946c (diff) | |
| download | dhcpcd-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |
