]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Don't loop forever when trying to skip an out-sequence netlink reply.
authorMartin Mares <mj@ucw.cz>
Fri, 3 Aug 2001 08:44:51 +0000 (08:44 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 3 Aug 2001 08:44:51 +0000 (08:44 +0000)
sysdep/linux/netlink/netlink.c

index fd9b3711a2794e14387ee8a17559aa4d6681809b..d08a1216a204e840882a2b25fdacae67ad28b6ab 100644 (file)
@@ -114,13 +114,13 @@ nl_get_reply(void)
       if (NLMSG_OK(nl_last_hdr, nl_last_size))
        {
          struct nlmsghdr *h = nl_last_hdr;
+         nl_last_hdr = NLMSG_NEXT(h, nl_last_size);
          if (h->nlmsg_seq != nl_sync_seq)
            {
              log(L_WARN "nl_get_reply: Ignoring out of sequence netlink packet (%x != %x)",
                  h->nlmsg_seq, nl_sync_seq);
              continue;
            }
-         nl_last_hdr = NLMSG_NEXT(h, nl_last_size);
          return h;
        }
       if (nl_last_size)