aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/arp.h1
-rw-r--r--net/ipv4/arp.c65
2 files changed, 0 insertions, 66 deletions
diff --git a/include/net/arp.h b/include/net/arp.h
index 73c49864076b..21ee1860abbc 100644
--- a/include/net/arp.h
+++ b/include/net/arp.h
@@ -47,7 +47,6 @@ static inline struct neighbour *__ipv4_neigh_lookup(struct net_device *dev, u32
47} 47}
48 48
49void arp_init(void); 49void arp_init(void);
50int arp_find(unsigned char *haddr, struct sk_buff *skb);
51int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg); 50int arp_ioctl(struct net *net, unsigned int cmd, void __user *arg);
52void arp_send(int type, int ptype, __be32 dest_ip, 51void arp_send(int type, int ptype, __be32 dest_ip,
53 struct net_device *dev, __be32 src_ip, 52 struct net_device *dev, __be32 src_ip,
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 2557cf9a4648..bca5b9d9b442 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -396,71 +396,6 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
396 return flag; 396 return flag;
397} 397}
398 398
399/* OBSOLETE FUNCTIONS */
400
401/*
402 * Find an arp mapping in the cache. If not found, post a request.
403 *
404 * It is very UGLY routine: it DOES NOT use skb->dst->neighbour,
405 * even if it exists. It is supposed that skb->dev was mangled
406 * by a virtual device (eql, shaper). Nobody but broken devices
407 * is allowed to use this function, it is scheduled to be removed. --ANK
408 */
409
410static int arp_set_predefined(int addr_hint, unsigned char *haddr,
411 __be32 paddr, struct net_device *dev)
412{
413 switch (addr_hint) {
414 case RTN_LOCAL:
415 pr_debug("arp called for own IP address\n");
416 memcpy(haddr, dev->dev_addr, dev->addr_len);
417 return 1;
418 case RTN_MULTICAST:
419 arp_mc_map(paddr, haddr, dev, 1);
420 return 1;
421 case RTN_BROADCAST:
422 memcpy(haddr, dev->broadcast, dev->addr_len);
423 return 1;
424 }
425 return 0;
426}
427
428
429int arp_find(unsigned char *haddr, struct sk_buff *skb)
430{
431 struct net_device *dev = skb->dev;
432 __be32 paddr;
433 struct neighbour *n;
434
435 if (!skb_dst(skb)) {
436 pr_debug("arp_find is called with dst==NULL\n");
437 kfree_skb(skb);
438 return 1;
439 }
440
441 paddr = rt_nexthop(skb_rtable(skb), ip_hdr(skb)->daddr);
442 if (arp_set_predefined(inet_addr_type(dev_net(dev), paddr), haddr,
443 paddr, dev))
444 return 0;
445
446 n = __neigh_lookup(&arp_tbl, &paddr, dev, 1);
447
448 if (n) {
449 n->used = jiffies;
450 if (n->nud_state & NUD_VALID || neigh_event_send(n, skb) == 0) {
451 neigh_ha_snapshot(haddr, n, dev);
452 neigh_release(n);
453 return 0;
454 }
455 neigh_release(n);
456 } else
457 kfree_skb(skb);
458 return 1;
459}
460EXPORT_SYMBOL(arp_find);
461
462/* END OF OBSOLETE FUNCTIONS */
463
464/* 399/*
465 * Check if we can use proxy ARP for this path 400 * Check if we can use proxy ARP for this path
466 */ 401 */