Fix endless loop in netlink error handling.
diff --git a/ChangeLog b/ChangeLog
index 0b4d158..49a1e9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,12 @@
+2006-03-10 Jean Tourrilhes <jt@hpl.hp.com>
+
+ * Fix endless loop in netlink error handling
+
2006-03-10 Russell Stuart <russell-lartc@stuart.id.au>
* Fix missing memset in tc sample
-2006-03-10 shemminger <shemminger@osdl.org>
+2006-03-10 Stephen Hemminger <shemminger@osdl.org>
* Change default lnstat count to 1
* Update to 2.6.16 headers
diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index 24e1f0b..67951fe 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -308,6 +308,9 @@
if (err < 0)
return err;
}
+ /* Don't forget to skip that message. */
+ status -= NLMSG_ALIGN(len);
+ h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
continue;
}