From 4c5022b100e7a7b11878f6e6fc9a3f56c03284e9 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 13 May 2012 01:20:56 +0000 Subject: [PATCH] Fix the fd6 condition for SIOCGLIFFLAGS. --- libdnet-stripped/src/intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c index 0c07c5787..9f4ba195b 100644 --- a/libdnet-stripped/src/intf.c +++ b/libdnet-stripped/src/intf.c @@ -418,7 +418,7 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry) * the ioctls gives ENXIO on Solaris. */ if (ioctl(intf->fd, SIOCGLIFFLAGS, &lifr) >= 0) fd = intf->fd; - else if (intf->fd6 == -1 || ioctl(intf->fd6, SIOCGLIFFLAGS, &lifr) >= 0) + else if (intf->fd6 != -1 && ioctl(intf->fd6, SIOCGLIFFLAGS, &lifr) >= 0) fd = intf->fd6; else return (-1);