summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/neighbour.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 86f9b165bbba..2569ab2cafbe 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2049,6 +2049,12 @@ static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh)
}
}
+ err = -ENOENT;
+ 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]);