aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/em_ipset.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-10-16 20:29:34 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-18 16:23:06 -0400
commitb1eda2ac3fa6bf23b27c7c70eda6885124c79ed3 (patch)
tree140ba166a2754f46f9205b38b6feff866a571ecd /net/sched/em_ipset.c
parent675297c904b419542a93de64afaf2a6bd72e35e3 (diff)
em_ipset: use dev_net() accessor
Randy found that if network namespace not enabled then nd_net does not exist and would cause compilation failure. This is handled correctly by using the dev_net() macro. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/em_ipset.c')
-rw-r--r--net/sched/em_ipset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/em_ipset.c b/net/sched/em_ipset.c
index 1ac41d3de5c3..527aeb7a3ff0 100644
--- a/net/sched/em_ipset.c
+++ b/net/sched/em_ipset.c
@@ -24,7 +24,7 @@ static int em_ipset_change(struct tcf_proto *tp, void *data, int data_len,
24{ 24{
25 struct xt_set_info *set = data; 25 struct xt_set_info *set = data;
26 ip_set_id_t index; 26 ip_set_id_t index;
27 struct net *net = qdisc_dev(tp->q)->nd_net; 27 struct net *net = dev_net(qdisc_dev(tp->q));
28 28
29 if (data_len != sizeof(*set)) 29 if (data_len != sizeof(*set))
30 return -EINVAL; 30 return -EINVAL;
@@ -46,7 +46,7 @@ static void em_ipset_destroy(struct tcf_proto *p, struct tcf_ematch *em)
46{ 46{
47 const struct xt_set_info *set = (const void *) em->data; 47 const struct xt_set_info *set = (const void *) em->data;
48 if (set) { 48 if (set) {
49 ip_set_nfnl_put(qdisc_dev(p->q)->nd_net, set->index); 49 ip_set_nfnl_put(dev_net(qdisc_dev(p->q)), set->index);
50 kfree((void *) em->data); 50 kfree((void *) em->data);
51 } 51 }
52} 52}