Commit dc25c676 authored by Gao feng's avatar Gao feng Committed by David S. Miller
Browse files

neigh: disallow un-init_net to change thresh of neigh

thresh and interval are global resources,
only init net can change them.
Signed-off-by: default avatarGao feng <>
Signed-off-by: default avatarDavid S. Miller <>
parent 170d6f99
......@@ -2049,6 +2049,12 @@ static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh)
err = -ENOENT;
if ((tb[NDTA_THRESH1] || tb[NDTA_THRESH2] ||
!net_eq(net, &init_net))
goto errout_tbl_lock;
if (tb[NDTA_THRESH1])
tbl->gc_thresh1 = nla_get_u32(tb[NDTA_THRESH1]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment