]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't report DUID or IAID or the pseudo interface.
authorRoy Marples <roy@marples.name>
Mon, 7 Jul 2014 17:23:16 +0000 (17:23 +0000)
committerRoy Marples <roy@marples.name>
Mon, 7 Jul 2014 17:23:16 +0000 (17:23 +0000)
dhcpcd.c

index 4387f0cfee87116c9e39550856e2c09f52e9da5c..f9e12ca56fbe66966162995ee69a0a04a3398985 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -570,6 +570,8 @@ warn_iaid_conflict(struct interface *ifp, uint8_t *iaid)
        TAILQ_FOREACH(ifn, ifp->ctx->ifaces, next) {
                if (ifn == ifp)
                        continue;
+               if (ifn->options->options & DHCPCD_PFXDLGONLY)
+                       continue;
                if (memcmp(ifn->options->iaid, iaid,
                    sizeof(ifn->options->iaid)) == 0)
                        break;
@@ -623,11 +625,17 @@ dhcpcd_startinterface(void *arg)
                if (ifp->ctx->duid == NULL) {
                        if (duid_init(ifp) == 0)
                                return;
-                       syslog(LOG_INFO, "DUID %s",
-                           hwaddr_ntoa(ifp->ctx->duid, ifp->ctx->duid_len,
-                           buf, sizeof(buf)));
+                       if (!(ifo->options & DHCPCD_PFXDLGONLY))
+                               syslog(LOG_INFO, "DUID %s",
+                                   hwaddr_ntoa(ifp->ctx->duid,
+                                   ifp->ctx->duid_len,
+                                   buf, sizeof(buf)));
                }
+       }
 
+       if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6) &&
+           !(ifo->options & DHCPCD_PFXDLGONLY))
+       {
                /* Report IAIDs */
                syslog(LOG_INFO, "%s: IAID %s", ifp->name,
                    hwaddr_ntoa(ifo->iaid, sizeof(ifo->iaid),