]> err.no Git - linux-2.6/blobdiff - net/appletalk/aarp.c
[POWERPC] 83xx: Add default config file for Wind River SBC8349 board
[linux-2.6] / net / appletalk / aarp.c
index 80b54148460f5614a8290f8edf655eaf5407a70d..6c5c6dc098ec3c34814202979d84ec4dcc951376 100644 (file)
@@ -333,6 +333,9 @@ static int aarp_device_event(struct notifier_block *this, unsigned long event,
        struct net_device *dev = ptr;
        int ct;
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if (event == NETDEV_DOWN) {
                write_lock_bh(&aarp_lock);
 
@@ -713,6 +716,9 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev,
        struct atalk_addr sa, *ma, da;
        struct atalk_iface *ifa;
 
+       if (dev->nd_net != &init_net)
+               goto out0;
+
        /* We only do Ethernet SNAP AARP. */
        if (dev->type != ARPHRD_ETHER)
                goto out0;
@@ -816,8 +822,6 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev,
                                 * address. So as a precaution flush any
                                 * entries we have for this address.
                                 */
-                               struct aarp_entry *a;
-
                                a = __aarp_find_entry(resolved[sa.s_node %
                                                          (AARP_HASH_SIZE - 1)],
                                                      skb->dev, &sa);
@@ -991,6 +995,7 @@ static int aarp_seq_show(struct seq_file *seq, void *v)
        struct aarp_iter_state *iter = seq->private;
        struct aarp_entry *entry = v;
        unsigned long now = jiffies;
+       DECLARE_MAC_BUF(mac);
 
        if (v == SEQ_START_TOKEN)
                seq_puts(seq,
@@ -1001,13 +1006,7 @@ static int aarp_seq_show(struct seq_file *seq, void *v)
                           ntohs(entry->target_addr.s_net),
                           (unsigned int) entry->target_addr.s_node,
                           entry->dev ? entry->dev->name : "????");
-               seq_printf(seq, "%02X:%02X:%02X:%02X:%02X:%02X",
-                          entry->hwaddr[0] & 0xFF,
-                          entry->hwaddr[1] & 0xFF,
-                          entry->hwaddr[2] & 0xFF,
-                          entry->hwaddr[3] & 0xFF,
-                          entry->hwaddr[4] & 0xFF,
-                          entry->hwaddr[5] & 0xFF);
+               seq_printf(seq, "%s", print_mac(mac, entry->hwaddr));
                seq_printf(seq, " %8s",
                           dt2str((long)entry->expires_at - (long)now));
                if (iter->table == unresolved)