]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/arp.c
mib: add net to NET_INC_STATS
[linux-2.6-omap-h63xx.git] / net / ipv4 / arp.c
index 418862f1bf221925e08f4cc04891165f81b25776..aab98b8a99457b3e214c6b45ea6c59b2d6aa5a72 100644 (file)
@@ -1,6 +1,4 @@
 /* linux/net/ipv4/arp.c
- *
- * Version:    $Id: arp.c,v 1.99 2001/08/30 22:55:42 davem Exp $
  *
  * Copyright (C) 1994 by Florian  La Roche
  *
@@ -423,8 +421,9 @@ static int arp_filter(__be32 sip, __be32 tip, struct net_device *dev)
        struct rtable *rt;
        int flag = 0;
        /*unsigned long now; */
+       struct net *net = dev_net(dev);
 
-       if (ip_route_output_key(dev_net(dev), &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);
@@ -1199,7 +1198,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;
@@ -1288,7 +1287,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;
@@ -1302,8 +1300,8 @@ 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;