From: Roy Marples Date: Sun, 26 Jul 2015 14:35:27 +0000 (+0000) Subject: Ignore interface address changes we made on Linux. X-Git-Tag: v6.9.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cd6bfb832b886db0c5415d345a61eab64bc4aa3;p=thirdparty%2Fdhcpcd.git Ignore interface address changes we made on Linux. Fixes [0f72e262e9]. --- diff --git a/if-linux.c b/if-linux.c index 89b70999..8b08822a 100644 --- a/if-linux.c +++ b/if-linux.c @@ -595,6 +595,14 @@ link_addr(struct dhcpcd_ctx *ctx, struct interface *ifp, struct nlmsghdr *nlm) errno = EBADMSG; return -1; } + + /* Ignore messages generated by us. + * For some reason we get messages generated by us + * with a very large value in nlmsg_pid that seems to be + * sequentially changing. Is there a better test for this? */ + if (nlm->nlmsg_pid > get_max_pid_t()) + return 1; + ifa = NLMSG_DATA(nlm); if ((ifp = if_findindex(ctx->ifaces, ifa->ifa_index)) == NULL) { /* We don't know about the interface the address is for