summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2016-03-03 14:34:14 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-06 22:57:35 -0500
commit44ef548f4f8bbc739070583f9844ff0cd8fcc6b4 (patch)
tree63926572c730ec566b61cc3eb48019433793b7a6 /net/sched
parenteb1f420214adf81fd98d9e8df6b60318ef883102 (diff)
downloadop-kernel-dev-44ef548f4f8bbc739070583f9844ff0cd8fcc6b4.zip
op-kernel-dev-44ef548f4f8bbc739070583f9844ff0cd8fcc6b4.tar.gz
net: sched: fix act_ipt for LOG target
Before calling the destroy() or target() callbacks, the family parameter field has to be initialized. Otherwise at least the LOG target will refuse to work and upon removal oops the kernel. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_ipt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index d058696..6b70399 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -62,6 +62,7 @@ static void ipt_destroy_target(struct xt_entry_target *t)
struct xt_tgdtor_param par = {
.target = t->u.kernel.target,
.targinfo = t->data,
+ .family = NFPROTO_IPV4,
};
if (par.target->destroy != NULL)
par.target->destroy(&par);
@@ -195,6 +196,7 @@ static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
par.hooknum = ipt->tcfi_hook;
par.target = ipt->tcfi_t->u.kernel.target;
par.targinfo = ipt->tcfi_t->data;
+ par.family = NFPROTO_IPV4;
ret = par.target->target(skb, &par);
switch (ret) {
OpenPOWER on IntegriCloud