]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/addrconf.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6-omap-h63xx.git] / net / ipv6 / addrconf.c
index 5a5f8bd4597a71362570316cfbeb068d2ad5af24..f96ed76d8fa4be902ea922f113bb6a18dab6010b 100644 (file)
@@ -2154,6 +2154,15 @@ static void addrconf_dev_config(struct net_device *dev)
 
        ASSERT_RTNL();
 
+       if ((dev->type != ARPHRD_ETHER) &&
+           (dev->type != ARPHRD_FDDI) &&
+           (dev->type != ARPHRD_IEEE802_TR) &&
+           (dev->type != ARPHRD_ARCNET) &&
+           (dev->type != ARPHRD_INFINIBAND)) {
+               /* Alas, we support only Ethernet autoconfiguration. */
+               return;
+       }
+
        idev = addrconf_add_dev(dev);
        if (idev == NULL)
                return;
@@ -2241,36 +2250,16 @@ static void addrconf_ip6_tnl_config(struct net_device *dev)
        ip6_tnl_add_linklocal(idev);
 }
 
-static int ipv6_hwtype(struct net_device *dev)
-{
-       if ((dev->type == ARPHRD_ETHER) ||
-           (dev->type == ARPHRD_LOOPBACK) ||
-           (dev->type == ARPHRD_SIT) ||
-           (dev->type == ARPHRD_TUNNEL6) ||
-           (dev->type == ARPHRD_FDDI) ||
-           (dev->type == ARPHRD_IEEE802_TR) ||
-           (dev->type == ARPHRD_ARCNET) ||
-           (dev->type == ARPHRD_INFINIBAND))
-               return 1;
-
-       return 0;
-}
-
 static int addrconf_notify(struct notifier_block *this, unsigned long event,
                           void * data)
 {
        struct net_device *dev = (struct net_device *) data;
-       struct inet6_dev *idev;
+       struct inet6_dev *idev = __in6_dev_get(dev);
        int run_pending = 0;
 
-       if (!ipv6_hwtype(dev))
-               return NOTIFY_OK;
-
-       idev = __in6_dev_get(dev);
-
        switch(event) {
        case NETDEV_REGISTER:
-               if (!idev) {
+               if (!idev && dev->mtu >= IPV6_MIN_MTU) {
                        idev = ipv6_add_dev(dev);
                        if (!idev)
                                printk(KERN_WARNING "IPv6: add_dev failed for %s\n",