Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56970
b: refs/heads/master
c: bbb711e
h: refs/heads/master
v: v3
  • Loading branch information
Oliver Hartkopp authored and David S. Miller committed May 24, 2007
1 parent a668748 commit d22645a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 36247f5421015eab0bdd96789b24790598934db9
refs/heads/master: bbb711e63332d7b43b535381c78b26a66cd60f48
31 changes: 21 additions & 10 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,15 +2154,6 @@ 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;
Expand Down Expand Up @@ -2250,13 +2241,33 @@ 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 = __in6_dev_get(dev);
struct inet6_dev *idev;
int run_pending = 0;

if (!ipv6_hwtype(dev))
return NOTIFY_OK;

idev = __in6_dev_get(dev);

switch(event) {
case NETDEV_REGISTER:
if (!idev) {
Expand Down

0 comments on commit d22645a

Please sign in to comment.