diff -ur --exclude=*.[ao] --exclude=.* linux/net/ipv4/devinet.c linux-2.4.0-test1/net/ipv4/devinet.c --- linux/net/ipv4/devinet.c Sun Jan 9 00:36:20 2000 +++ linux-2.4.0-test1/net/ipv4/devinet.c Sun Jun 4 11:01:47 2000 @@ -357,6 +357,19 @@ return NULL; } +struct in_ifaddr *inet_ifa_bylocal(struct in_device *in_dev, u32 local ) +{ + read_lock(&in_dev->lock); + for_ifa(in_dev) { + if (ifa->ifa_local == local) { + read_unlock(&in_dev->lock); + return ifa; + } + } endfor_ifa(in_dev); + read_unlock(&in_dev->lock); + return NULL; +} + #ifdef CONFIG_RTNETLINK int diff -ur --exclude=*.[ao] --exclude=.* linux/net/ipv4/arp.c linux-2.4.0-test1/net/ipv4/arp.c --- linux/net/ipv4/arp.c Wed Apr 26 15:13:17 2000 +++ linux-2.4.0-test1/net/ipv4/arp.c Sun Jun 4 10:39:28 2000 @@ -65,6 +65,7 @@ * clean up the APFDDI & gen. FDDI bits. * Alexey Kuznetsov: new arp state machine; * now it is in net/core/neighbour.c. + * Jerome Etienne : support IFA_F_NO_NDISC */ /* RFC1122 Status: @@ -719,6 +720,10 @@ addr_type = rt->rt_type; if (addr_type == RTN_LOCAL) { + struct in_ifaddr *ifa = inet_ifa_bylocal( in_dev, tip ); + /* if the target address is IFA_F_NONDISC, dont reply */ + if( ifa && (ifa->ifa_flags & IFA_F_NO_NDISC) ) + goto out; n = neigh_event_ns(&arp_tbl, sha, &sip, dev); if (n) { arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha); diff -ur --exclude=*.[ao] --exclude=.* linux/include/linux/inetdevice.h linux-2.4.0-test1/include/linux/inetdevice.h --- linux/include/linux/inetdevice.h Mon Aug 23 13:01:02 1999 +++ linux-2.4.0-test1/include/linux/inetdevice.h Sat Jun 3 21:38:43 2000 @@ -80,6 +80,7 @@ extern struct in_device *inetdev_by_index(int); extern u32 inet_select_addr(const struct net_device *dev, u32 dst, int scope); extern struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, u32 prefix, u32 mask); +extern struct in_ifaddr *inet_ifa_bylocal(struct in_device *in_dev, u32 local); extern void inet_forward_change(void); extern __inline__ int inet_ifa_match(u32 addr, struct in_ifaddr *ifa) diff -ur --exclude=*.[ao] --exclude=.* linux/include/linux/rtnetlink.h linux-2.4.0-test1/include/linux/rtnetlink.h --- linux/include/linux/rtnetlink.h Wed Feb 9 23:08:09 2000 +++ linux-2.4.0-test1/include/linux/rtnetlink.h Sun Jun 4 10:47:55 2000 @@ -312,6 +312,8 @@ /* ifa_flags */ #define IFA_F_SECONDARY 0x01 +#define IFA_F_NO_NDISC 0x02 /* no ndisc's answer for this address */ +/* jme- why this hole between secondary(0x01) and deprecated(0x20) ? */ #define IFA_F_DEPRECATED 0x20 #define IFA_F_TENTATIVE 0x40