]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ignore interface address changes we made on Linux.
authorRoy Marples <roy@marples.name>
Sun, 26 Jul 2015 14:35:27 +0000 (14:35 +0000)
committerRoy Marples <roy@marples.name>
Sun, 26 Jul 2015 14:35:27 +0000 (14:35 +0000)
Fixes [0f72e262e9].

if-linux.c

index 89b709999013e98861359183d4195107cf731d1a..8b08822a77d67fe730c2f12faa7812797b0fcb2c 100644 (file)
@@ -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