From: Martin Mares Date: Fri, 3 Aug 2001 08:44:51 +0000 (+0000) Subject: Don't loop forever when trying to skip an out-sequence netlink reply. X-Git-Tag: v1.2.0~467 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fc7c5c51344a8cc1fae2cc9077c2c331c1e419a;p=thirdparty%2Fbird.git Don't loop forever when trying to skip an out-sequence netlink reply. --- diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index fd9b3711a..d08a1216a 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -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)