Loading include/net/arp.h +0 −1 Original line number Diff line number Diff line Loading @@ -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, Loading net/ipv4/arp.c +0 −65 Original line number Diff line number Diff line Loading @@ -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 */ Loading Loading
include/net/arp.h +0 −1 Original line number Diff line number Diff line Loading @@ -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, Loading
net/ipv4/arp.c +0 −65 Original line number Diff line number Diff line Loading @@ -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 */ Loading