]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/tipc/eth_media.c
[NET]: Make device event notification network namespace safe
[net-next-2.6.git] / net / tipc / eth_media.c
index d2ed23704189d3c59238c20fc4c25510512cb9a6..406f0d26fa812a81d940e48826cbc00017745acc 100644 (file)
@@ -198,6 +198,9 @@ static int recv_notification(struct notifier_block *nb, unsigned long evt,
        struct eth_bearer *eb_ptr = &eth_bearers[0];
        struct eth_bearer *stop = &eth_bearers[MAX_ETH_BEARERS];
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        while ((eb_ptr->dev != dev)) {
                if (++eb_ptr == stop)
                        return NOTIFY_DONE;     /* couldn't find device */