diff options
Diffstat (limited to 'net/sched/act_mirred.c')
-rw-r--r-- | net/sched/act_mirred.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 579578944ae..fd7bca4d5c2 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <net/net_namespace.h> | ||
23 | #include <net/netlink.h> | 24 | #include <net/netlink.h> |
24 | #include <net/pkt_sched.h> | 25 | #include <net/pkt_sched.h> |
25 | #include <linux/tc_act/tc_mirred.h> | 26 | #include <linux/tc_act/tc_mirred.h> |
@@ -73,7 +74,7 @@ static int tcf_mirred_init(struct rtattr *rta, struct rtattr *est, | |||
73 | parm = RTA_DATA(tb[TCA_MIRRED_PARMS-1]); | 74 | parm = RTA_DATA(tb[TCA_MIRRED_PARMS-1]); |
74 | 75 | ||
75 | if (parm->ifindex) { | 76 | if (parm->ifindex) { |
76 | dev = __dev_get_by_index(parm->ifindex); | 77 | dev = __dev_get_by_index(&init_net, parm->ifindex); |
77 | if (dev == NULL) | 78 | if (dev == NULL) |
78 | return -ENODEV; | 79 | return -ENODEV; |
79 | switch (dev->type) { | 80 | switch (dev->type) { |