From: shemminger Date: Fri, 10 Mar 2006 23:31:46 +0000 (+0000) Subject: Fix endless loop in netlink error handling. X-Git-Tag: ss-060314~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cca16f20e92a97399d5814fc810af66ce0581d8;p=thirdparty%2Fiproute2.git Fix endless loop in netlink error handling. --- diff --git a/ChangeLog b/ChangeLog index 0b4d158a0..49a1e9cf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ +2006-03-10 Jean Tourrilhes + + * Fix endless loop in netlink error handling + 2006-03-10 Russell Stuart * Fix missing memset in tc sample -2006-03-10 shemminger +2006-03-10 Stephen Hemminger * Change default lnstat count to 1 * Update to 2.6.16 headers diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 24e1f0b6f..67951fe7d 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -308,6 +308,9 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, 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; }