1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-17 21:19:01 +00:00

Fix the fd6 condition for SIOCGLIFFLAGS.

This commit is contained in:
david
2012-05-13 01:20:56 +00:00
parent 7cfee5944c
commit 4c5022b100

View File

@@ -418,7 +418,7 @@ _intf_get_noalias(intf_t *intf, struct intf_entry *entry)
* the ioctls gives ENXIO on Solaris. */ * the ioctls gives ENXIO on Solaris. */
if (ioctl(intf->fd, SIOCGLIFFLAGS, &lifr) >= 0) if (ioctl(intf->fd, SIOCGLIFFLAGS, &lifr) >= 0)
fd = intf->fd; 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; fd = intf->fd6;
else else
return (-1); return (-1);