diff options
-rw-r--r-- | drivers/ipoe/ipoe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 4951c53..f3acb3f 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -784,13 +784,12 @@ static struct ipoe_session *ipoe_lookup_rt6(struct sk_buff *skb, const struct in if (!dst) return NULL; + *dev = dst->dev; + if (dst->error || dst->dev->netdev_ops != &ipoe_netdev_ops) { dst_release(dst); return NULL; } - - *dev = dst->dev; - ses = netdev_priv(*dev); atomic_inc(&ses->refs); |