summaryrefslogtreecommitdiffstats
path: root/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-07-07 14:41:18 +0000
committerRoy Marples <roy@marples.name>2014-07-07 14:41:18 +0000
commit9d5cb9f924a239a6a0981d50c1e85f9b1d9ca36b (patch)
tree32e3d3b26e1df606221c77eb201c957de52b2eca /if.c
parentab234549b19f9c5b4aad1fc1add66c36ab2e4469 (diff)
downloaddhcpcd-9d5cb9f924a239a6a0981d50c1e85f9b1d9ca36b.tar.xz
When requesting a IA_PD and another IA type, create a psuedo interface
to handle the IA_PD. ia_pd_mix config option disables this and mixes IA_PD in the single session as per draft-ietf-dhc-dhcpv6-stateful-issues-06.
Diffstat (limited to 'if.c')
-rw-r--r--if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/if.c b/if.c
index 9deb6dd1..bcabca0e 100644
--- a/if.c
+++ b/if.c
@@ -240,6 +240,7 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv)
}
if (ifp)
continue;
+
if (argc > 0) {
for (i = 0; i < argc; i++) {
#ifdef __linux__
@@ -483,7 +484,9 @@ if_find(struct dhcpcd_ctx *ctx, const char *ifname)
if (ctx != NULL && ctx->ifaces != NULL) {
TAILQ_FOREACH(ifp, ctx->ifaces, next) {
- if (strcmp(ifp->name, ifname) == 0)
+ if ((ifp->options ||
+ !(ifp->options->options & DHCPCD_PFXDLGONLY)) &&
+ strcmp(ifp->name, ifname) == 0)
return ifp;
}
}