Message ID | 1371011651-30894-2-git-send-email-gaofeng@cn.fujitsu.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index e4027ff..8feb382 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2056,6 +2056,12 @@ static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh) } } + err = -EPERM; + if ((tb[NDTA_THRESH1] || tb[NDTA_THRESH2] || + tb[NDTA_THRESH3] || tb[NDTA_GC_INTERVAL]) && + !net_eq(net, &init_net)) + goto errout_tbl_lock; + if (tb[NDTA_THRESH1]) tbl->gc_thresh1 = nla_get_u32(tb[NDTA_THRESH1]);