diff -ur linux-2.4.9.orig/drivers/net/shaper.c linux-2.4.9/drivers/net/shaper.c --- linux-2.4.9.orig/drivers/net/shaper.c Thu Jun 28 02:10:55 2001 +++ linux-2.4.9/drivers/net/shaper.c Tue Sep 11 13:20:09 2001 @@ -670,6 +670,7 @@ dev->addr_len = 0; dev->tx_queue_len = 10; dev->flags = 0; + dev->features |= NETIF_F_SHAPER; /* * Shaper is ok diff -ur linux-2.4.9.orig/include/linux/if_shaper.h linux-2.4.9/include/linux/if_shaper.h --- linux-2.4.9.orig/include/linux/if_shaper.h Wed Aug 18 20:38:47 1999 +++ linux-2.4.9/include/linux/if_shaper.h Tue Sep 11 13:20:00 2001 @@ -14,6 +14,8 @@ #define SHAPER_MAXSLIP 2 #define SHAPER_BURST (HZ/50) /* Good for >128K then */ +#define IS_SHAPERDEVICE(dev) ((dev)->features & NETIF_F_SHAPER) + struct shaper { struct sk_buff_head sendq; diff -ur linux-2.4.9.orig/include/linux/netdevice.h linux-2.4.9/include/linux/netdevice.h --- linux-2.4.9.orig/include/linux/netdevice.h Sun Sep 9 16:15:40 2001 +++ linux-2.4.9/include/linux/netdevice.h Tue Sep 11 13:20:04 2001 @@ -345,6 +345,7 @@ #define NETIF_F_DYNALLOC 16 /* Self-dectructable device. */ #define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */ #define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */ +#define NETIF_F_SHAPER 128 /* Shaper device. */ /* Called after device is detached from network. */ void (*uninit)(struct net_device *dev); diff -ur linux-2.4.9.orig/net/ipv4/arp.c linux-2.4.9/net/ipv4/arp.c --- linux-2.4.9.orig/net/ipv4/arp.c Wed May 16 19:21:45 2001 +++ linux-2.4.9/net/ipv4/arp.c Tue Sep 11 13:19:51 2001 @@ -111,8 +111,7 @@ #include #include - - +#include /* * Interface to generic neighbour cache. @@ -767,8 +766,15 @@ } goto out; } else if (IN_DEV_FORWARD(in_dev)) { + char shflag=0; + if ( (rt->u.dst.dev) && + (rt->u.dst.dev->priv) && + (((struct shaper *) rt->u.dst.dev->priv)->dev) && + (IS_SHAPERDEVICE(rt->u.dst.dev)) ) + shflag=1; if ((rt->rt_flags&RTCF_DNAT) || - (addr_type == RTN_UNICAST && rt->u.dst.dev != dev && + (addr_type == RTN_UNICAST && + ( ((shflag) && ( ((struct shaper *) rt->u.dst.dev->priv)->dev != dev)) || ((!shflag) && (rt->u.dst.dev != dev)) ) && (IN_DEV_PROXY_ARP(in_dev) || pneigh_lookup(&arp_tbl, &tip, dev, 0)))) { n = neigh_event_ns(&arp_tbl, sha, &sip, dev); if (n)