]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/ipv4/arp.c
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[linux-2.6.git] / net / ipv4 / arp.c
index 7b51b3bdb548060b7c5ad42851c530a8321782c8..96c1955b3e2f5b47181c6fe331b581fc161baf27 100644 (file)
@@ -1,6 +1,4 @@
-/* linux/net/inet/arp.c
- *
- * Version:    $Id: arp.c,v 1.99 2001/08/30 22:55:42 davem Exp $
+/* linux/net/ipv4/arp.c
  *
  * Copyright (C) 1994 by Florian  La Roche
  *
@@ -15,9 +13,9 @@
  * 2 of the License, or (at your option) any later version.
  *
  * Fixes:
- *             Alan Cox        :       Removed the Ethernet assumptions in 
+ *             Alan Cox        :       Removed the Ethernet assumptions in
  *                                     Florian's code
- *             Alan Cox        :       Fixed some small errors in the ARP 
+ *             Alan Cox        :       Fixed some small errors in the ARP
  *                                     logic
  *             Alan Cox        :       Allow >4K in /proc
  *             Alan Cox        :       Make ARP add its own protocol entry
  *             Jonathan Naylor :       Only lookup the hardware address for
  *                                     the correct hardware type.
  *             Germano Caronni :       Assorted subtle races.
- *             Craig Schlenter :       Don't modify permanent entry 
+ *             Craig Schlenter :       Don't modify permanent entry
  *                                     during arp_rcv.
  *             Russ Nelson     :       Tidied up a few bits.
  *             Alexey Kuznetsov:       Major changes to caching and behaviour,
- *                                     eg intelligent arp probing and 
+ *                                     eg intelligent arp probing and
  *                                     generation
  *                                     of host down events.
  *             Alan Cox        :       Missing unlock in device events.
  *             Eckes           :       ARP ioctl control errors.
  *             Alexey Kuznetsov:       Arp free fix.
  *             Manuel Rodriguez:       Gratuitous ARP.
- *              Jonathan Layes  :       Added arpd support through kerneld 
+ *              Jonathan Layes  :       Added arpd support through kerneld
  *                                      message queue (960314)
  *             Mike Shaver     :       /proc/sys/net/ipv4/arp_* support
  *             Mike McLagan    :       Routing by source
  *                                     bonding can change the skb before
  *                                     sending (e.g. insert 8021q tag).
  *             Harald Welte    :       convert to make use of jenkins hash
+ *             Jesper D. Brouer:       Proxy ARP PVLAN RFC 3069 support.
  */
 
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/capability.h>
 #include <linux/socket.h>
 #include <linux/sockios.h>
 #include <linux/net.h>
 #include <linux/rcupdate.h>
 #include <linux/jhash.h>
+#include <linux/slab.h>
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
+#include <net/net_namespace.h>
 #include <net/ip.h>
 #include <net/icmp.h>
 #include <net/route.h>
 #include <net/tcp.h>
 #include <net/sock.h>
 #include <net/arp.h>
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
 #include <net/ax25.h>
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
 #include <net/netrom.h>
-#endif
-#endif
 #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
 #include <net/atmclip.h>
 struct neigh_table *clip_tbl_hook;
+EXPORT_SYMBOL(clip_tbl_hook);
 #endif
 
 #include <asm/system.h>
@@ -136,7 +133,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb);
 static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb);
 static void parp_redo(struct sk_buff *skb);
 
-static struct neigh_ops arp_generic_ops = {
+static const struct neigh_ops arp_generic_ops = {
        .family =               AF_INET,
        .solicit =              arp_solicit,
        .error_report =         arp_error_report,
@@ -146,7 +143,7 @@ static struct neigh_ops arp_generic_ops = {
        .queue_xmit =           dev_queue_xmit,
 };
 
-static struct neigh_ops arp_hh_ops = {
+static const struct neigh_ops arp_hh_ops = {
        .family =               AF_INET,
        .solicit =              arp_solicit,
        .error_report =         arp_error_report,
@@ -156,7 +153,7 @@ static struct neigh_ops arp_hh_ops = {
        .queue_xmit =           dev_queue_xmit,
 };
 
-static struct neigh_ops arp_direct_ops = {
+static const struct neigh_ops arp_direct_ops = {
        .family =               AF_INET,
        .output =               dev_queue_xmit,
        .connected_output =     dev_queue_xmit,
@@ -164,7 +161,7 @@ static struct neigh_ops arp_direct_ops = {
        .queue_xmit =           dev_queue_xmit,
 };
 
-struct neigh_ops arp_broken_ops = {
+const struct neigh_ops arp_broken_ops = {
        .family =               AF_INET,
        .solicit =              arp_solicit,
        .error_report =         arp_error_report,
@@ -173,6 +170,7 @@ struct neigh_ops arp_broken_ops = {
        .hh_output =            dev_queue_xmit,
        .queue_xmit =           dev_queue_xmit,
 };
+EXPORT_SYMBOL(arp_broken_ops);
 
 struct neigh_table arp_tbl = {
        .family =       AF_INET,
@@ -202,20 +200,21 @@ struct neigh_table arp_tbl = {
        .gc_thresh2 =   512,
        .gc_thresh3 =   1024,
 };
+EXPORT_SYMBOL(arp_tbl);
 
-int arp_mc_map(u32 addr, u8 *haddr, struct net_device *dev, int dir)
+int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
 {
        switch (dev->type) {
        case ARPHRD_ETHER:
        case ARPHRD_FDDI:
        case ARPHRD_IEEE802:
                ip_eth_mc_map(addr, haddr);
-               return 0; 
+               return 0;
        case ARPHRD_IEEE802_TR:
                ip_tr_mc_map(addr, haddr);
                return 0;
        case ARPHRD_INFINIBAND:
-               ip_ib_mc_map(addr, haddr);
+               ip_ib_mc_map(addr, dev->broadcast, haddr);
                return 0;
        default:
                if (dir) {
@@ -234,13 +233,11 @@ static u32 arp_hash(const void *pkey, const struct net_device *dev)
 
 static int arp_constructor(struct neighbour *neigh)
 {
-       u32 addr = *(u32*)neigh->primary_key;
+       __be32 addr = *(__be32*)neigh->primary_key;
        struct net_device *dev = neigh->dev;
        struct in_device *in_dev;
        struct neigh_parms *parms;
 
-       neigh->type = inet_addr_type(addr);
-
        rcu_read_lock();
        in_dev = __in_dev_get_rcu(dev);
        if (in_dev == NULL) {
@@ -248,12 +245,14 @@ static int arp_constructor(struct neighbour *neigh)
                return -EINVAL;
        }
 
+       neigh->type = inet_addr_type(dev_net(dev), addr);
+
        parms = in_dev->arp_parms;
        __neigh_parms_put(neigh->parms);
        neigh->parms = neigh_parms_clone(parms);
        rcu_read_unlock();
 
-       if (dev->hard_header == NULL) {
+       if (!dev->header_ops) {
                neigh->nud_state = NUD_NOARP;
                neigh->ops = &arp_direct_ops;
                neigh->output = neigh->ops->queue_xmit;
@@ -288,7 +287,7 @@ static int arp_constructor(struct neighbour *neigh)
                switch (dev->type) {
                default:
                        break;
-               case ARPHRD_ROSE:       
+               case ARPHRD_ROSE:
 #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
                case ARPHRD_AX25:
 #if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
@@ -310,10 +309,12 @@ static int arp_constructor(struct neighbour *neigh)
                        neigh->nud_state = NUD_NOARP;
                        memcpy(neigh->ha, dev->broadcast, dev->addr_len);
                }
-               if (dev->hard_header_cache)
+
+               if (dev->header_ops->cache)
                        neigh->ops = &arp_hh_ops;
                else
                        neigh->ops = &arp_generic_ops;
+
                if (neigh->nud_state&NUD_VALID)
                        neigh->output = neigh->ops->connected_output;
                else
@@ -330,27 +331,30 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
 
 static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
 {
-       u32 saddr = 0;
+       __be32 saddr = 0;
        u8  *dst_ha = NULL;
        struct net_device *dev = neigh->dev;
-       u32 target = *(u32*)neigh->primary_key;
+       __be32 target = *(__be32*)neigh->primary_key;
        int probes = atomic_read(&neigh->probes);
-       struct in_device *in_dev = in_dev_get(dev);
+       struct in_device *in_dev;
 
-       if (!in_dev)
+       rcu_read_lock();
+       in_dev = __in_dev_get_rcu(dev);
+       if (!in_dev) {
+               rcu_read_unlock();
                return;
-
+       }
        switch (IN_DEV_ARP_ANNOUNCE(in_dev)) {
        default:
        case 0:         /* By default announce any local IP */
-               if (skb && inet_addr_type(skb->nh.iph->saddr) == RTN_LOCAL)
-                       saddr = skb->nh.iph->saddr;
+               if (skb && inet_addr_type(dev_net(dev), ip_hdr(skb)->saddr) == RTN_LOCAL)
+                       saddr = ip_hdr(skb)->saddr;
                break;
        case 1:         /* Restrict announcements of saddr in same subnet */
                if (!skb)
                        break;
-               saddr = skb->nh.iph->saddr;
-               if (inet_addr_type(saddr) == RTN_LOCAL) {
+               saddr = ip_hdr(skb)->saddr;
+               if (inet_addr_type(dev_net(dev), saddr) == RTN_LOCAL) {
                        /* saddr should be known to target */
                        if (inet_addr_onlink(in_dev, target, saddr))
                                break;
@@ -360,9 +364,8 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
        case 2:         /* Avoid secondary IPs, get a primary/preferred one */
                break;
        }
+       rcu_read_unlock();
 
-       if (in_dev)
-               in_dev_put(in_dev);
        if (!saddr)
                saddr = inet_select_addr(dev, target, RT_SCOPE_LINK);
 
@@ -384,8 +387,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
                read_unlock_bh(&neigh->lock);
 }
 
-static int arp_ignore(struct in_device *in_dev, struct net_device *dev,
-                     u32 sip, u32 tip)
+static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)
 {
        int scope;
 
@@ -405,7 +407,6 @@ static int arp_ignore(struct in_device *in_dev, struct net_device *dev,
        case 3: /* Do not reply for scope host addresses */
                sip = 0;
                scope = RT_SCOPE_LINK;
-               dev = NULL;
                break;
        case 4: /* Reserved */
        case 5:
@@ -417,26 +418,27 @@ static int arp_ignore(struct in_device *in_dev, struct net_device *dev,
        default:
                return 0;
        }
-       return !inet_confirm_addr(dev, sip, tip, scope);
+       return !inet_confirm_addr(in_dev, sip, tip, scope);
 }
 
-static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev)
+static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
 {
        struct flowi fl = { .nl_u = { .ip4_u = { .daddr = sip,
                                                 .saddr = tip } } };
        struct rtable *rt;
-       int flag = 0; 
+       int flag = 0;
        /*unsigned long now; */
+       struct net *net = dev_net(dev);
 
-       if (ip_route_output_key(&rt, &fl) < 0) 
+       if (ip_route_output_key(net, &rt, &fl) < 0)
                return 1;
-       if (rt->u.dst.dev != dev) { 
-               NET_INC_STATS_BH(LINUX_MIB_ARPFILTER);
+       if (rt->dst.dev != dev) {
+               NET_INC_STATS_BH(net, LINUX_MIB_ARPFILTER);
                flag = 1;
-       } 
-       ip_rt_put(rt); 
-       return flag; 
-} 
+       }
+       ip_rt_put(rt);
+       return flag;
+}
 
 /* OBSOLETE FUNCTIONS */
 
@@ -449,7 +451,7 @@ static int arp_filter(__u32 sip, __u32 tip, struct net_device *dev)
  *     is allowed to use this function, it is scheduled to be removed. --ANK
  */
 
-static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, struct net_device * dev)
+static int arp_set_predefined(int addr_hint, unsigned char * haddr, __be32 paddr, struct net_device * dev)
 {
        switch (addr_hint) {
        case RTN_LOCAL:
@@ -470,18 +472,18 @@ static int arp_set_predefined(int addr_hint, unsigned char * haddr, u32 paddr, s
 int arp_find(unsigned char *haddr, struct sk_buff *skb)
 {
        struct net_device *dev = skb->dev;
-       u32 paddr;
+       __be32 paddr;
        struct neighbour *n;
 
-       if (!skb->dst) {
+       if (!skb_dst(skb)) {
                printk(KERN_DEBUG "arp_find is called with dst==NULL\n");
                kfree_skb(skb);
                return 1;
        }
 
-       paddr = ((struct rtable*)skb->dst)->rt_gateway;
+       paddr = skb_rtable(skb)->rt_gateway;
 
-       if (arp_set_predefined(inet_addr_type(paddr), haddr, paddr, dev))
+       if (arp_set_predefined(inet_addr_type(dev_net(dev), paddr), haddr, paddr, dev))
                return 0;
 
        n = __neigh_lookup(&arp_tbl, &paddr, dev, 1);
@@ -490,7 +492,7 @@ int arp_find(unsigned char *haddr, struct sk_buff *skb)
                n->used = jiffies;
                if (n->nud_state&NUD_VALID || neigh_event_send(n, skb) == 0) {
                        read_lock_bh(&n->lock);
-                       memcpy(haddr, n->ha, dev->addr_len);
+                       memcpy(haddr, n->ha, dev->addr_len);
                        read_unlock_bh(&n->lock);
                        neigh_release(n);
                        return 0;
@@ -500,6 +502,7 @@ int arp_find(unsigned char *haddr, struct sk_buff *skb)
                kfree_skb(skb);
        return 1;
 }
+EXPORT_SYMBOL(arp_find);
 
 /* END OF OBSOLETE FUNCTIONS */
 
@@ -511,7 +514,7 @@ int arp_bind_neighbour(struct dst_entry *dst)
        if (dev == NULL)
                return -EINVAL;
        if (n == NULL) {
-               u32 nexthop = ((struct rtable*)dst)->rt_gateway;
+               __be32 nexthop = ((struct rtable *)dst)->rt_gateway;
                if (dev->flags&(IFF_LOOPBACK|IFF_POINTOPOINT))
                        nexthop = 0;
                n = __neigh_lookup_errno(
@@ -529,12 +532,15 @@ int arp_bind_neighbour(struct dst_entry *dst)
 /*
  * Check if we can use proxy ARP for this path
  */
-
-static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt)
+static inline int arp_fwd_proxy(struct in_device *in_dev,
+                               struct net_device *dev, struct rtable *rt)
 {
        struct in_device *out_dev;
        int imi, omi = -1;
 
+       if (rt->dst.dev == dev)
+               return 0;
+
        if (!IN_DEV_PROXY_ARP(in_dev))
                return 0;
 
@@ -545,13 +551,50 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt)
 
        /* place to check for proxy_arp for routes */
 
-       if ((out_dev = in_dev_get(rt->u.dst.dev)) != NULL) {
+       out_dev = __in_dev_get_rcu(rt->dst.dev);
+       if (out_dev)
                omi = IN_DEV_MEDIUM_ID(out_dev);
-               in_dev_put(out_dev);
-       }
+
        return (omi != imi && omi != -1);
 }
 
+/*
+ * Check for RFC3069 proxy arp private VLAN (allow to send back to same dev)
+ *
+ * RFC3069 supports proxy arp replies back to the same interface.  This
+ * is done to support (ethernet) switch features, like RFC 3069, where
+ * the individual ports are not allowed to communicate with each
+ * other, BUT they are allowed to talk to the upstream router.  As
+ * described in RFC 3069, it is possible to allow these hosts to
+ * communicate through the upstream router, by proxy_arp'ing.
+ *
+ * RFC 3069: "VLAN Aggregation for Efficient IP Address Allocation"
+ *
+ *  This technology is known by different names:
+ *    In RFC 3069 it is called VLAN Aggregation.
+ *    Cisco and Allied Telesyn call it Private VLAN.
+ *    Hewlett-Packard call it Source-Port filtering or port-isolation.
+ *    Ericsson call it MAC-Forced Forwarding (RFC Draft).
+ *
+ */
+static inline int arp_fwd_pvlan(struct in_device *in_dev,
+                               struct net_device *dev, struct rtable *rt,
+                               __be32 sip, __be32 tip)
+{
+       /* Private VLAN is only concerned about the same ethernet segment */
+       if (rt->dst.dev != dev)
+               return 0;
+
+       /* Don't reply on self probes (often done by windowz boxes)*/
+       if (sip == tip)
+               return 0;
+
+       if (IN_DEV_PROXY_ARP_PVLAN(in_dev))
+               return 1;
+       else
+               return 0;
+}
+
 /*
  *     Interface to link layer: send routine and receive handler.
  */
@@ -560,10 +603,11 @@ static inline int arp_fwd_proxy(struct in_device *in_dev, struct rtable *rt)
  *     Create an arp packet. If (dest_hw == NULL), we create a broadcast
  *     message.
  */
-struct sk_buff *arp_create(int type, int ptype, u32 dest_ip,
-                          struct net_device *dev, u32 src_ip,
-                          unsigned char *dest_hw, unsigned char *src_hw,
-                          unsigned char *target_hw)
+struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
+                          struct net_device *dev, __be32 src_ip,
+                          const unsigned char *dest_hw,
+                          const unsigned char *src_hw,
+                          const unsigned char *target_hw)
 {
        struct sk_buff *skb;
        struct arphdr *arp;
@@ -572,15 +616,14 @@ struct sk_buff *arp_create(int type, int ptype, u32 dest_ip,
        /*
         *      Allocate a buffer
         */
-       
-       skb = alloc_skb(sizeof(struct arphdr)+ 2*(dev->addr_len+4)
-                               + LL_RESERVED_SPACE(dev), GFP_ATOMIC);
+
+       skb = alloc_skb(arp_hdr_len(dev) + LL_ALLOCATED_SPACE(dev), GFP_ATOMIC);
        if (skb == NULL)
                return NULL;
 
        skb_reserve(skb, LL_RESERVED_SPACE(dev));
-       skb->nh.raw = skb->data;
-       arp = (struct arphdr *) skb_put(skb,sizeof(struct arphdr) + 2*(dev->addr_len+4));
+       skb_reset_network_header(skb);
+       arp = (struct arphdr *) skb_put(skb, arp_hdr_len(dev));
        skb->dev = dev;
        skb->protocol = htons(ETH_P_ARP);
        if (src_hw == NULL)
@@ -591,8 +634,7 @@ struct sk_buff *arp_create(int type, int ptype, u32 dest_ip,
        /*
         *      Fill the device header for the ARP frame
         */
-       if (dev->hard_header &&
-           dev->hard_header(skb,dev,ptype,dest_hw,src_hw,skb->len) < 0)
+       if (dev_hard_header(skb, dev, ptype, dest_hw, src_hw, skb->len) < 0)
                goto out;
 
        /*
@@ -625,13 +667,13 @@ struct sk_buff *arp_create(int type, int ptype, u32 dest_ip,
 #endif
 #endif
 
-#ifdef CONFIG_FDDI
+#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
        case ARPHRD_FDDI:
                arp->ar_hrd = htons(ARPHRD_ETHER);
                arp->ar_pro = htons(ETH_P_IP);
                break;
 #endif
-#ifdef CONFIG_TR
+#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
        case ARPHRD_IEEE802_TR:
                arp->ar_hrd = htons(ARPHRD_IEEE802);
                arp->ar_pro = htons(ETH_P_IP);
@@ -646,14 +688,14 @@ struct sk_buff *arp_create(int type, int ptype, u32 dest_ip,
        arp_ptr=(unsigned char *)(arp+1);
 
        memcpy(arp_ptr, src_hw, dev->addr_len);
-       arp_ptr+=dev->addr_len;
-       memcpy(arp_ptr, &src_ip,4);
-       arp_ptr+=4;
+       arp_ptr += dev->addr_len;
+       memcpy(arp_ptr, &src_ip, 4);
+       arp_ptr += 4;
        if (target_hw != NULL)
                memcpy(arp_ptr, target_hw, dev->addr_len);
        else
                memset(arp_ptr, 0, dev->addr_len);
-       arp_ptr+=dev->addr_len;
+       arp_ptr += dev->addr_len;
        memcpy(arp_ptr, &dest_ip, 4);
 
        return skb;
@@ -662,6 +704,7 @@ out:
        kfree_skb(skb);
        return NULL;
 }
+EXPORT_SYMBOL(arp_create);
 
 /*
  *     Send an arp packet.
@@ -669,23 +712,24 @@ out:
 void arp_xmit(struct sk_buff *skb)
 {
        /* Send it off, maybe filter it using firewalling first.  */
-       NF_HOOK(NF_ARP, NF_ARP_OUT, skb, NULL, skb->dev, dev_queue_xmit);
+       NF_HOOK(NFPROTO_ARP, NF_ARP_OUT, skb, NULL, skb->dev, dev_queue_xmit);
 }
+EXPORT_SYMBOL(arp_xmit);
 
 /*
  *     Create and send an arp packet.
  */
-void arp_send(int type, int ptype, u32 dest_ip, 
-             struct net_device *dev, u32 src_ip, 
-             unsigned char *dest_hw, unsigned char *src_hw,
-             unsigned char *target_hw)
+void arp_send(int type, int ptype, __be32 dest_ip,
+             struct net_device *dev, __be32 src_ip,
+             const unsigned char *dest_hw, const unsigned char *src_hw,
+             const unsigned char *target_hw)
 {
        struct sk_buff *skb;
 
        /*
         *      No arp on this interface.
         */
-       
+
        if (dev->flags&IFF_NOARP)
                return;
 
@@ -697,6 +741,7 @@ void arp_send(int type, int ptype, u32 dest_ip,
 
        arp_xmit(skb);
 }
+EXPORT_SYMBOL(arp_send);
 
 /*
  *     Process an arp request.
@@ -705,15 +750,16 @@ void arp_send(int type, int ptype, u32 dest_ip,
 static int arp_process(struct sk_buff *skb)
 {
        struct net_device *dev = skb->dev;
-       struct in_device *in_dev = in_dev_get(dev);
+       struct in_device *in_dev = __in_dev_get_rcu(dev);
        struct arphdr *arp;
        unsigned char *arp_ptr;
        struct rtable *rt;
-       unsigned char *sha, *tha;
-       u32 sip, tip;
+       unsigned char *sha;
+       __be32 sip, tip;
        u16 dev_type = dev->type;
        int addr_type;
        struct neighbour *n;
+       struct net *net = dev_net(dev);
 
        /* arp_rcv below verifies the ARP header and verifies the device
         * is ARP'able.
@@ -722,28 +768,18 @@ static int arp_process(struct sk_buff *skb)
        if (in_dev == NULL)
                goto out;
 
-       arp = skb->nh.arph;
+       arp = arp_hdr(skb);
 
        switch (dev_type) {
-       default:        
+       default:
                if (arp->ar_pro != htons(ETH_P_IP) ||
                    htons(dev_type) != arp->ar_hrd)
                        goto out;
                break;
-#ifdef CONFIG_NET_ETHERNET
        case ARPHRD_ETHER:
-#endif
-#ifdef CONFIG_TR
        case ARPHRD_IEEE802_TR:
-#endif
-#ifdef CONFIG_FDDI
        case ARPHRD_FDDI:
-#endif
-#ifdef CONFIG_NET_FC
        case ARPHRD_IEEE802:
-#endif
-#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \
-    defined(CONFIG_FDDI)        || defined(CONFIG_NET_FC)
                /*
                 * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
                 * devices, according to RFC 2625) devices will accept ARP
@@ -758,21 +794,16 @@ static int arp_process(struct sk_buff *skb)
                    arp->ar_pro != htons(ETH_P_IP))
                        goto out;
                break;
-#endif
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
        case ARPHRD_AX25:
                if (arp->ar_pro != htons(AX25_P_IP) ||
                    arp->ar_hrd != htons(ARPHRD_AX25))
                        goto out;
                break;
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
        case ARPHRD_NETROM:
                if (arp->ar_pro != htons(AX25_P_IP) ||
                    arp->ar_hrd != htons(ARPHRD_NETROM))
                        goto out;
                break;
-#endif
-#endif
        }
 
        /* Understand only these message types */
@@ -789,14 +820,13 @@ static int arp_process(struct sk_buff *skb)
        arp_ptr += dev->addr_len;
        memcpy(&sip, arp_ptr, 4);
        arp_ptr += 4;
-       tha     = arp_ptr;
        arp_ptr += dev->addr_len;
        memcpy(&tip, arp_ptr, 4);
-/* 
+/*
  *     Check for bad requests for 127.x.x.x and requests for multicast
  *     addresses.  If this is one such, delete it.
  */
-       if (LOOPBACK(tip) || MULTICAST(tip))
+       if (ipv4_is_loopback(tip) || ipv4_is_multicast(tip))
                goto out;
 
 /*
@@ -809,64 +839,66 @@ static int arp_process(struct sk_buff *skb)
  *  Process entry.  The idea here is we want to send a reply if it is a
  *  request for us or if it is a request for someone else that we hold
  *  a proxy for.  We want to add an entry to our cache if it is a reply
- *  to us or if it is a request for our address.  
- *  (The assumption for this last is that if someone is requesting our 
- *  address, they are probably intending to talk to us, so it saves time 
- *  if we cache their address.  Their address is also probably not in 
+ *  to us or if it is a request for our address.
+ *  (The assumption for this last is that if someone is requesting our
+ *  address, they are probably intending to talk to us, so it saves time
+ *  if we cache their address.  Their address is also probably not in
  *  our cache, since ours is not in their cache.)
- * 
+ *
  *  Putting this another way, we only care about replies if they are to
  *  us, in which case we add them to the cache.  For requests, we care
  *  about those for us and those for our proxies.  We reply to both,
- *  and in the case of requests for us we add the requester to the arp 
+ *  and in the case of requests for us we add the requester to the arp
  *  cache.
  */
 
        /* Special case: IPv4 duplicate address detection packet (RFC2131) */
        if (sip == 0) {
                if (arp->ar_op == htons(ARPOP_REQUEST) &&
-                   inet_addr_type(tip) == RTN_LOCAL &&
-                   !arp_ignore(in_dev,dev,sip,tip))
-                       arp_send(ARPOP_REPLY,ETH_P_ARP,tip,dev,tip,sha,dev->dev_addr,dev->dev_addr);
+                   inet_addr_type(net, tip) == RTN_LOCAL &&
+                   !arp_ignore(in_dev, sip, tip))
+                       arp_send(ARPOP_REPLY, ETH_P_ARP, sip, dev, tip, sha,
+                                dev->dev_addr, sha);
                goto out;
        }
 
        if (arp->ar_op == htons(ARPOP_REQUEST) &&
-           ip_route_input(skb, tip, sip, 0, dev) == 0) {
+           ip_route_input_noref(skb, tip, sip, 0, dev) == 0) {
 
-               rt = (struct rtable*)skb->dst;
+               rt = skb_rtable(skb);
                addr_type = rt->rt_type;
 
                if (addr_type == RTN_LOCAL) {
-                       n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
-                       if (n) {
-                               int dont_send = 0;
-
-                               if (!dont_send)
-                                       dont_send |= arp_ignore(in_dev,dev,sip,tip);
-                               if (!dont_send && IN_DEV_ARPFILTER(in_dev))
-                                       dont_send |= arp_filter(sip,tip,dev); 
-                               if (!dont_send)
-                                       arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
+                       int dont_send = 0;
 
-                               neigh_release(n);
+                       if (!dont_send)
+                               dont_send |= arp_ignore(in_dev,sip,tip);
+                       if (!dont_send && IN_DEV_ARPFILTER(in_dev))
+                               dont_send |= arp_filter(sip,tip,dev);
+                       if (!dont_send) {
+                               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);
+                                       neigh_release(n);
+                               }
                        }
                        goto out;
                } else if (IN_DEV_FORWARD(in_dev)) {
-                       if ((rt->rt_flags&RTCF_DNAT) ||
-                           (addr_type == RTN_UNICAST  && rt->u.dst.dev != dev &&
-                            (arp_fwd_proxy(in_dev, rt) || pneigh_lookup(&arp_tbl, &tip, dev, 0)))) {
+                       if (addr_type == RTN_UNICAST  &&
+                           (arp_fwd_proxy(in_dev, dev, rt) ||
+                            arp_fwd_pvlan(in_dev, dev, rt, sip, tip) ||
+                            pneigh_lookup(&arp_tbl, net, &tip, dev, 0)))
+                       {
                                n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
                                if (n)
                                        neigh_release(n);
 
-                               if (NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED || 
+                               if (NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED ||
                                    skb->pkt_type == PACKET_HOST ||
                                    in_dev->arp_parms->proxy_delay == 0) {
                                        arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
                                } else {
                                        pneigh_enqueue(&arp_tbl, in_dev->arp_parms, skb);
-                                       in_dev_put(in_dev);
                                        return 0;
                                }
                                goto out;
@@ -878,15 +910,16 @@ static int arp_process(struct sk_buff *skb)
 
        n = __neigh_lookup(&arp_tbl, &sip, dev, 0);
 
-       if (ipv4_devconf.arp_accept) {
+       if (IPV4_DEVCONF_ALL(dev_net(dev), ARP_ACCEPT)) {
                /* Unsolicited ARP is not accepted by default.
                   It is possible, that this option should be enabled for some
                   devices (strip is candidate)
                 */
                if (n == NULL &&
-                   arp->ar_op == htons(ARPOP_REPLY) &&
-                   inet_addr_type(sip) == RTN_UNICAST)
-                       n = __neigh_lookup(&arp_tbl, &sip, dev, -1);
+                   (arp->ar_op == htons(ARPOP_REPLY) ||
+                    (arp->ar_op == htons(ARPOP_REQUEST) && tip == sip)) &&
+                   inet_addr_type(net, sip) == RTN_UNICAST)
+                       n = __neigh_lookup(&arp_tbl, &sip, dev, 1);
        }
 
        if (n) {
@@ -911,9 +944,7 @@ static int arp_process(struct sk_buff *skb)
        }
 
 out:
-       if (in_dev)
-               in_dev_put(in_dev);
-       kfree_skb(skb);
+       consume_skb(skb);
        return 0;
 }
 
@@ -933,12 +964,10 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
        struct arphdr *arp;
 
        /* ARP header, plus 2 device addresses, plus 2 IP addresses.  */
-       if (!pskb_may_pull(skb, (sizeof(struct arphdr) +
-                                (2 * dev->addr_len) +
-                                (2 * sizeof(u32)))))
+       if (!pskb_may_pull(skb, arp_hdr_len(dev)))
                goto freeskb;
 
-       arp = skb->nh.arph;
+       arp = arp_hdr(skb);
        if (arp->ar_hln != dev->addr_len ||
            dev->flags & IFF_NOARP ||
            skb->pkt_type == PACKET_OTHERHOST ||
@@ -951,7 +980,7 @@ static int arp_rcv(struct sk_buff *skb, struct net_device *dev,
 
        memset(NEIGH_CB(skb), 0, sizeof(struct neighbour_cb));
 
-       return NF_HOOK(NF_ARP, NF_ARP_IN, skb, dev, NULL, arp_process);
+       return NF_HOOK(NFPROTO_ARP, NF_ARP_IN, skb, dev, NULL, arp_process);
 
 freeskb:
        kfree_skb(skb);
@@ -967,52 +996,68 @@ out_of_mem:
  *     Set (create) an ARP cache entry.
  */
 
-static int arp_req_set(struct arpreq *r, struct net_device * dev)
+static int arp_req_set_proxy(struct net *net, struct net_device *dev, int on)
+{
+       if (dev == NULL) {
+               IPV4_DEVCONF_ALL(net, PROXY_ARP) = on;
+               return 0;
+       }
+       if (__in_dev_get_rtnl(dev)) {
+               IN_DEV_CONF_SET(__in_dev_get_rtnl(dev), PROXY_ARP, on);
+               return 0;
+       }
+       return -ENXIO;
+}
+
+static int arp_req_set_public(struct net *net, struct arpreq *r,
+               struct net_device *dev)
 {
-       u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
+       __be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
+       __be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
+
+       if (mask && mask != htonl(0xFFFFFFFF))
+               return -EINVAL;
+       if (!dev && (r->arp_flags & ATF_COM)) {
+               dev = dev_getbyhwaddr(net, r->arp_ha.sa_family,
+                               r->arp_ha.sa_data);
+               if (!dev)
+                       return -ENODEV;
+       }
+       if (mask) {
+               if (pneigh_lookup(&arp_tbl, net, &ip, dev, 1) == NULL)
+                       return -ENOBUFS;
+               return 0;
+       }
+
+       return arp_req_set_proxy(net, dev, 1);
+}
+
+static int arp_req_set(struct net *net, struct arpreq *r,
+               struct net_device * dev)
+{
+       __be32 ip;
        struct neighbour *neigh;
        int err;
 
-       if (r->arp_flags&ATF_PUBL) {
-               u32 mask = ((struct sockaddr_in *) &r->arp_netmask)->sin_addr.s_addr;
-               if (mask && mask != 0xFFFFFFFF)
-                       return -EINVAL;
-               if (!dev && (r->arp_flags & ATF_COM)) {
-                       dev = dev_getbyhwaddr(r->arp_ha.sa_family, r->arp_ha.sa_data);
-                       if (!dev)
-                               return -ENODEV;
-               }
-               if (mask) {
-                       if (pneigh_lookup(&arp_tbl, &ip, dev, 1) == NULL)
-                               return -ENOBUFS;
-                       return 0;
-               }
-               if (dev == NULL) {
-                       ipv4_devconf.proxy_arp = 1;
-                       return 0;
-               }
-               if (__in_dev_get_rtnl(dev)) {
-                       __in_dev_get_rtnl(dev)->cnf.proxy_arp = 1;
-                       return 0;
-               }
-               return -ENXIO;
-       }
+       if (r->arp_flags & ATF_PUBL)
+               return arp_req_set_public(net, r, dev);
 
+       ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
        if (r->arp_flags & ATF_PERM)
                r->arp_flags |= ATF_COM;
        if (dev == NULL) {
                struct flowi fl = { .nl_u = { .ip4_u = { .daddr = ip,
                                                         .tos = RTO_ONLINK } } };
                struct rtable * rt;
-               if ((err = ip_route_output_key(&rt, &fl)) != 0)
+               if ((err = ip_route_output_key(net, &rt, &fl)) != 0)
                        return err;
-               dev = rt->u.dst.dev;
+               dev = rt->dst.dev;
                ip_rt_put(rt);
                if (!dev)
                        return -EINVAL;
        }
        switch (dev->type) {
-#ifdef CONFIG_FDDI
+#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
        case ARPHRD_FDDI:
                /*
                 * According to RFC 1390, FDDI devices should accept ARP
@@ -1039,7 +1084,7 @@ static int arp_req_set(struct arpreq *r, struct net_device * dev)
                if (r->arp_flags & ATF_PERM)
                        state = NUD_PERMANENT;
                err = neigh_update(neigh, (r->arp_flags&ATF_COM) ?
-                                  r->arp_ha.sa_data : NULL, state, 
+                                  r->arp_ha.sa_data : NULL, state,
                                   NEIGH_UPDATE_F_OVERRIDE|
                                   NEIGH_UPDATE_F_ADMIN);
                neigh_release(neigh);
@@ -1063,7 +1108,7 @@ static unsigned arp_state_to_flags(struct neighbour *neigh)
 
 static int arp_req_get(struct arpreq *r, struct net_device *dev)
 {
-       u32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
+       __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
        struct neighbour *neigh;
        int err = -ENXIO;
 
@@ -1081,38 +1126,39 @@ static int arp_req_get(struct arpreq *r, struct net_device *dev)
        return err;
 }
 
-static int arp_req_delete(struct arpreq *r, struct net_device * dev)
+static int arp_req_delete_public(struct net *net, struct arpreq *r,
+               struct net_device *dev)
+{
+       __be32 ip = ((struct sockaddr_in *) &r->arp_pa)->sin_addr.s_addr;
+       __be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
+
+       if (mask == htonl(0xFFFFFFFF))
+               return pneigh_delete(&arp_tbl, net, &ip, dev);
+
+       if (mask)
+               return -EINVAL;
+
+       return arp_req_set_proxy(net, dev, 0);
+}
+
+static int arp_req_delete(struct net *net, struct arpreq *r,
+               struct net_device * dev)
 {
        int err;
-       u32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
+       __be32 ip;
        struct neighbour *neigh;
 
-       if (r->arp_flags & ATF_PUBL) {
-               u32 mask =
-                      ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr;
-               if (mask == 0xFFFFFFFF)
-                       return pneigh_delete(&arp_tbl, &ip, dev);
-               if (mask == 0) {
-                       if (dev == NULL) {
-                               ipv4_devconf.proxy_arp = 0;
-                               return 0;
-                       }
-                       if (__in_dev_get_rtnl(dev)) {
-                               __in_dev_get_rtnl(dev)->cnf.proxy_arp = 0;
-                               return 0;
-                       }
-                       return -ENXIO;
-               }
-               return -EINVAL;
-       }
+       if (r->arp_flags & ATF_PUBL)
+               return arp_req_delete_public(net, r, dev);
 
+       ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr;
        if (dev == NULL) {
                struct flowi fl = { .nl_u = { .ip4_u = { .daddr = ip,
                                                         .tos = RTO_ONLINK } } };
                struct rtable * rt;
-               if ((err = ip_route_output_key(&rt, &fl)) != 0)
+               if ((err = ip_route_output_key(net, &rt, &fl)) != 0)
                        return err;
-               dev = rt->u.dst.dev;
+               dev = rt->dst.dev;
                ip_rt_put(rt);
                if (!dev)
                        return -EINVAL;
@@ -1121,7 +1167,7 @@ static int arp_req_delete(struct arpreq *r, struct net_device * dev)
        neigh = neigh_lookup(&arp_tbl, &ip, dev);
        if (neigh) {
                if (neigh->nud_state&~NUD_NOARP)
-                       err = neigh_update(neigh, NULL, NUD_FAILED, 
+                       err = neigh_update(neigh, NULL, NUD_FAILED,
                                           NEIGH_UPDATE_F_OVERRIDE|
                                           NEIGH_UPDATE_F_ADMIN);
                neigh_release(neigh);
@@ -1133,7 +1179,7 @@ static int arp_req_delete(struct arpreq *r, struct net_device * dev)
  *     Handle an ARP layer I/O control request.
  */
 
-int arp_ioctl(unsigned int cmd, void __user *arg)
+int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg)
 {
        int err;
        struct arpreq r;
@@ -1165,7 +1211,7 @@ int arp_ioctl(unsigned int cmd, void __user *arg)
        rtnl_lock();
        if (r.arp_dev[0]) {
                err = -ENODEV;
-               if ((dev = __dev_get_by_name(r.arp_dev)) == NULL)
+               if ((dev = __dev_get_by_name(net, r.arp_dev)) == NULL)
                        goto out;
 
                /* Mmmm... It is wrong... ARPHRD_NETROM==0 */
@@ -1179,12 +1225,12 @@ int arp_ioctl(unsigned int cmd, void __user *arg)
                goto out;
        }
 
-       switch(cmd) {
+       switch (cmd) {
        case SIOCDARP:
-               err = arp_req_delete(&r, dev);
+               err = arp_req_delete(net, &r, dev);
                break;
        case SIOCSARP:
-               err = arp_req_set(&r, dev);
+               err = arp_req_set(net, &r, dev);
                break;
        case SIOCGARP:
                err = arp_req_get(&r, dev);
@@ -1204,7 +1250,7 @@ static int arp_netdev_event(struct notifier_block *this, unsigned long event, vo
        switch (event) {
        case NETDEV_CHANGEADDR:
                neigh_changeaddr(&arp_tbl, dev);
-               rt_cache_flush(0);
+               rt_cache_flush(dev_net(dev), 0);
                break;
        default:
                break;
@@ -1231,8 +1277,8 @@ void arp_ifdown(struct net_device *dev)
  *     Called once on startup.
  */
 
-static struct packet_type arp_packet_type = {
-       .type = __constant_htons(ETH_P_ARP),
+static struct packet_type arp_packet_type __read_mostly = {
+       .type = cpu_to_be16(ETH_P_ARP),
        .func = arp_rcv,
 };
 
@@ -1245,8 +1291,7 @@ void __init arp_init(void)
        dev_add_pack(&arp_packet_type);
        arp_proc_init();
 #ifdef CONFIG_SYSCTL
-       neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4,
-                             NET_IPV4_NEIGH, "ipv4", NULL, NULL);
+       neigh_sysctl_register(NULL, &arp_tbl.parms, "ipv4", NULL);
 #endif
        register_netdevice_notifier(&arp_netdev_notifier);
 }
@@ -1268,14 +1313,14 @@ static char *ax2asc2(ax25_address *a, char *buf)
 
                if (c != ' ') *s++ = c;
        }
-       
+
        *s++ = '-';
 
        if ((n = ((a->ax25_call[6] >> 1) & 0x0F)) > 9) {
                *s++ = '1';
                n -= 10;
        }
-       
+
        *s++ = n + '0';
        *s++ = '\0';
 
@@ -1293,7 +1338,6 @@ static void arp_format_neigh_entry(struct seq_file *seq,
                                   struct neighbour *n)
 {
        char hbuffer[HBUFFERLEN];
-       const char hexbuf[] = "0123456789ABCDEF";
        int k, j;
        char tbuf[16];
        struct net_device *dev = n->dev;
@@ -1307,15 +1351,17 @@ static void arp_format_neigh_entry(struct seq_file *seq,
        else {
 #endif
        for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) {
-               hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15];
-               hbuffer[k++] = hexbuf[n->ha[j] & 15];
+               hbuffer[k++] = hex_asc_hi(n->ha[j]);
+               hbuffer[k++] = hex_asc_lo(n->ha[j]);
                hbuffer[k++] = ':';
        }
-       hbuffer[--k] = 0;
+       if (k != 0)
+               --k;
+       hbuffer[k] = 0;
 #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
        }
 #endif
-       sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key));
+       sprintf(tbuf, "%pI4", n->primary_key);
        seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
                   tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name);
        read_unlock(&n->lock);
@@ -1328,7 +1374,7 @@ static void arp_format_pneigh_entry(struct seq_file *seq,
        int hatype = dev ? dev->type : 0;
        char tbuf[16];
 
-       sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key));
+       sprintf(tbuf, "%pI4", n->key);
        seq_printf(seq, "%-16s 0x%-10x0x%-10x%s     *        %s\n",
                   tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00",
                   dev ? dev->name : "*");
@@ -1361,7 +1407,7 @@ static void *arp_seq_start(struct seq_file *seq, loff_t *pos)
 
 /* ------------------------------------------------------------------------ */
 
-static struct seq_operations arp_seq_ops = {
+static const struct seq_operations arp_seq_ops = {
        .start  = arp_seq_start,
        .next   = neigh_seq_next,
        .stop   = neigh_seq_stop,
@@ -1370,42 +1416,41 @@ static struct seq_operations arp_seq_ops = {
 
 static int arp_seq_open(struct inode *inode, struct file *file)
 {
-       struct seq_file *seq;
-       int rc = -ENOMEM;
-       struct neigh_seq_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-       
-       if (!s)
-               goto out;
-
-       memset(s, 0, sizeof(*s));
-       rc = seq_open(file, &arp_seq_ops);
-       if (rc)
-               goto out_kfree;
-
-       seq          = file->private_data;
-       seq->private = s;
-out:
-       return rc;
-out_kfree:
-       kfree(s);
-       goto out;
+       return seq_open_net(inode, file, &arp_seq_ops,
+                           sizeof(struct neigh_seq_state));
 }
 
-static struct file_operations arp_seq_fops = {
+static const struct file_operations arp_seq_fops = {
        .owner          = THIS_MODULE,
        .open           = arp_seq_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
-       .release        = seq_release_private,
+       .release        = seq_release_net,
 };
 
-static int __init arp_proc_init(void)
+
+static int __net_init arp_net_init(struct net *net)
 {
-       if (!proc_net_fops_create("arp", S_IRUGO, &arp_seq_fops))
+       if (!proc_net_fops_create(net, "arp", S_IRUGO, &arp_seq_fops))
                return -ENOMEM;
        return 0;
 }
 
+static void __net_exit arp_net_exit(struct net *net)
+{
+       proc_net_remove(net, "arp");
+}
+
+static struct pernet_operations arp_net_ops = {
+       .init = arp_net_init,
+       .exit = arp_net_exit,
+};
+
+static int __init arp_proc_init(void)
+{
+       return register_pernet_subsys(&arp_net_ops);
+}
+
 #else /* CONFIG_PROC_FS */
 
 static int __init arp_proc_init(void)
@@ -1414,14 +1459,3 @@ static int __init arp_proc_init(void)
 }
 
 #endif /* CONFIG_PROC_FS */
-
-EXPORT_SYMBOL(arp_broken_ops);
-EXPORT_SYMBOL(arp_find);
-EXPORT_SYMBOL(arp_create);
-EXPORT_SYMBOL(arp_xmit);
-EXPORT_SYMBOL(arp_send);
-EXPORT_SYMBOL(arp_tbl);
-
-#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
-EXPORT_SYMBOL(clip_tbl_hook);
-#endif