Re: ioctl SIOCGIFNETMASK: ip alias bug 2.4.9 and 2.2.19

From: jamal (hadi@cyberus.ca)
Date: Wed Sep 05 2001 - 17:08:18 EST


Andi, Alexey,

Whats wrong with this patch (just a thought, not tested or even compiled)?

---------------------------------------
--- devinet.c 2001/09/04 19:18:51 1.1
+++ devinet.c 2001/09/04 19:31:13
@@ -530,7 +530,7 @@

        if ((in_dev=__in_dev_get(dev)) != NULL) {
                for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL;
ifap=&ifa->ifa_next)
- if (strcmp(ifr.ifr_name, ifa->ifa_label) == 0)
+ if ((strcmp(ifr.ifr_name, ifa->ifa_label) == 0) ||
(sin->sin_addr.s_addr == ifa->ifa_address))
                                break;
        }
--------------------------------

cheers,
jamal

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:32 EST