[NET]: Modify all rtnetlink methods to only work in the initial namespace (v2)
[deliverable/linux.git] / net / decnet / dn_table.c
index fda0772fa215afa59ab258668fecffaa95625f87..a3bdb8dd1fb233bd46ffc974752c066346702823 100644 (file)
@@ -463,12 +463,16 @@ static int dn_fib_table_dump(struct dn_fib_table *tb, struct sk_buff *skb,
 
 int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb)
 {
+       struct net *net = skb->sk->sk_net;
        unsigned int h, s_h;
        unsigned int e = 0, s_e;
        struct dn_fib_table *tb;
        struct hlist_node *node;
        int dumped = 0;
 
+       if (net != &init_net)
+               return 0;
+
        if (NLMSG_PAYLOAD(cb->nlh, 0) >= sizeof(struct rtmsg) &&
                ((struct rtmsg *)NLMSG_DATA(cb->nlh))->rtm_flags&RTM_F_CLONED)
                        return dn_cache_dump(skb, cb);
This page took 0.025537 seconds and 5 git commands to generate.