Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67041
b: refs/heads/master
c: f24e3d6
h: refs/heads/master
i:
  67039: cb7b42b
v: v3
  • Loading branch information
Mitsuru Chinen authored and David S. Miller committed Oct 10, 2007
1 parent 56c71a0 commit f27411b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 9b7726523523472ead660b1d45df29dcaf6cc5c0
refs/heads/master: f24e3d658cf382f11a7aa7887fa99147bdc6fe0b
13 changes: 10 additions & 3 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include <net/tcp.h>
#include <net/ip.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <linux/if_tunnel.h>
#include <linux/rtnetlink.h>

Expand Down Expand Up @@ -213,6 +214,12 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;

/* Check if a valid qdisc is available */
static inline int addrconf_qdisc_ok(struct net_device *dev)
{
return (dev->qdisc != &noop_qdisc);
}

static void addrconf_del_timer(struct inet6_ifaddr *ifp)
{
if (del_timer(&ifp->timer))
Expand Down Expand Up @@ -384,7 +391,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
}
#endif

if (netif_running(dev) && netif_carrier_ok(dev))
if (netif_running(dev) && addrconf_qdisc_ok(dev))
ndev->if_flags |= IF_READY;

ipv6_mc_init_dev(ndev);
Expand Down Expand Up @@ -2283,7 +2290,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
break;

if (event == NETDEV_UP) {
if (!netif_carrier_ok(dev)) {
if (!addrconf_qdisc_ok(dev)) {
/* device is not ready yet. */
printk(KERN_INFO
"ADDRCONF(NETDEV_UP): %s: "
Expand All @@ -2295,7 +2302,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
if (idev)
idev->if_flags |= IF_READY;
} else {
if (!netif_carrier_ok(dev)) {
if (!addrconf_qdisc_ok(dev)) {
/* device is still not ready. */
break;
}
Expand Down

0 comments on commit f27411b

Please sign in to comment.