On 09/22/2011 05:34 AM, Laine Stump wrote:
This patch addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=736920 https://bugzilla.redhat.com/show_bug.cgi?id=739505
Commit 38f44cf (pushed between 0.1.8 and 0.1.9) put a check for an invalid ifindex into the functions that add type-specific status data to the xml document (e.g. the mac address of an ethernet, or tag of a vlan). This check was inadvertently done incorrectly ("ifindex != RTNL_LINK_NOT_FOUND" rather than "ifindex == RTNL_LINK_NOT_FOUND"). This patch corrects that error.
Because these functions are a part of the code to gather info from the kernel via libnl (netlink) calls, there is unfortunately no simple way to incorporate a build-time test to prevent similar regressions in the future; we will instead have to rely on separate testing.
src/dutil_linux.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dutil_linux.c b/src/dutil_linux.c index 75492ba..730be45 100644 --- a/src/dutil_linux.c +++ b/src/dutil_linux.c @@ -909,7 +909,7 @@ static void add_ethernet_info(struct netcf *ncf, struct rtnl_link *filter_link = NULL;
/* if interface isn't currently available, nothing to add */
- if (ifindex != RTNL_LINK_NOT_FOUND)
- if (ifindex == RTNL_LINK_NOT_FOUND)
ACK.