]> git.karo-electronics.de Git - linux-beck.git/commitdiff
arp: Kill arp_find
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 2 Mar 2015 06:12:05 +0000 (00:12 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2015 21:43:41 +0000 (16:43 -0500)
There are no more callers so kill this function.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/arp.h
net/ipv4/arp.c

index 73c49864076b3370f015d11616f02c47a2768ff0..21ee1860abbc7109006ebc5d625ac25d41d3f6bc 100644 (file)
@@ -47,7 +47,6 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32
 }
 
 void arp_init(void);
-int arp_find(unsigned char *haddr, struct sk_buff *skb);
 int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
 void arp_send(int type, int ptype, __be32 dest_ip,
              struct net_device *dev, __be32 src_ip,
index 2557cf9a46480e38f2b2ca976797b9502b695047..bca5b9d9b4423225998b75a2d042d4d9203e4d6f 100644 (file)
@@ -396,71 +396,6 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
        return flag;
 }
 
-/* OBSOLETE FUNCTIONS */
-
-/*
- *     Find an arp mapping in the cache. If not found, post a request.
- *
- *     It is very UGLY routine: it DOES NOT use skb->dst->neighbour,
- *     even if it exists. It is supposed that skb->dev was mangled
- *     by a virtual device (eql, shaper). Nobody but broken devices
- *     is allowed to use this function, it is scheduled to be removed. --ANK
- */
-
-static int arp_set_predefined(int addr_hint, unsigned char *haddr,
-                             __be32 paddr, struct net_device *dev)
-{
-       switch (addr_hint) {
-       case RTN_LOCAL:
-               pr_debug("arp called for own IP address\n");
-               memcpy(haddr, dev->dev_addr, dev->addr_len);
-               return 1;
-       case RTN_MULTICAST:
-               arp_mc_map(paddr, haddr, dev, 1);
-               return 1;
-       case RTN_BROADCAST:
-               memcpy(haddr, dev->broadcast, dev->addr_len);
-               return 1;
-       }
-       return 0;
-}
-
-
-int arp_find(unsigned char *haddr, struct sk_buff *skb)
-{
-       struct net_device *dev = skb->dev;
-       __be32 paddr;
-       struct neighbour *n;
-
-       if (!skb_dst(skb)) {
-               pr_debug("arp_find is called with dst==NULL\n");
-               kfree_skb(skb);
-               return 1;
-       }
-
-       paddr = rt_nexthop(skb_rtable(skb), ip_hdr(skb)->daddr);
-       if (arp_set_predefined(inet_addr_type(dev_net(dev), paddr), haddr,
-                              paddr, dev))
-               return 0;
-
-       n = __neigh_lookup(&arp_tbl, &paddr, dev, 1);
-
-       if (n) {
-               n->used = jiffies;
-               if (n->nud_state & NUD_VALID || neigh_event_send(n, skb) == 0) {
-                       neigh_ha_snapshot(haddr, n, dev);
-                       neigh_release(n);
-                       return 0;
-               }
-               neigh_release(n);
-       } else
-               kfree_skb(skb);
-       return 1;
-}
-EXPORT_SYMBOL(arp_find);
-
-/* END OF OBSOLETE FUNCTIONS */
-
 /*
  * Check if we can use proxy ARP for this path
  */