diff -NurpP linux-2.6.16-vs2.1.1-rc16.1/net/ipv4/devinet.c linux-2.6.16-vs2.1.1-rc16.2/net/ipv4/devinet.c --- linux-2.6.16-vs2.1.1-rc16.1/net/ipv4/devinet.c 2006-03-20 17:34:50 +0100 +++ linux-2.6.16-vs2.1.1-rc16.2/net/ipv4/devinet.c 2006-04-15 19:15:17 +0200 @@ -634,6 +634,9 @@ int devinet_ioctl(unsigned int cmd, void *colon = ':'; if ((in_dev = __in_dev_get_rtnl(dev)) != NULL) { + struct nx_info *nxi = current->nx_info; + int hide_netif = vx_flags(VXF_HIDE_NETIF, 0); + if (tryaddrmatch) { /* Matthias Andree */ /* compare label and address (4.4BSD style) */ @@ -642,6 +645,8 @@ int devinet_ioctl(unsigned int cmd, void This is checked above. */ for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL; ifap = &ifa->ifa_next) { + if (hide_netif && !ifa_in_nx_info(ifa, nxi)) + continue; if (!strcmp(ifr.ifr_name, ifa->ifa_label) && sin_orig.sin_addr.s_addr == ifa->ifa_address) { @@ -654,18 +659,18 @@ int devinet_ioctl(unsigned int cmd, void comparing just the label */ if (!ifa) { for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL; - ifap = &ifa->ifa_next) + ifap = &ifa->ifa_next) { + if (hide_netif && !ifa_in_nx_info(ifa, nxi)) + continue; if (!strcmp(ifr.ifr_name, ifa->ifa_label)) break; + } } } ret = -EADDRNOTAVAIL; if (!ifa && cmd != SIOCSIFADDR && cmd != SIOCSIFFLAGS) goto done; - if (vx_flags(VXF_HIDE_NETIF, 0) && - !ifa_in_nx_info(ifa, current->nx_info)) - goto done; switch(cmd) { case SIOCGIFADDR: /* Get interface address */