From: Phil Sutter <psutter@redhat.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>, Phil Sutter <phil@nwl.cc>,
Jamal Hadi Salim <jhs@mojatatu.com>
Subject: [net PATCH] net: sched: fix act_ipt for LOG target
Date: Thu, 3 Mar 2016 14:34:14 +0100 [thread overview]
Message-ID: <1457012054-18012-1-git-send-email-psutter@redhat.com> (raw)
From: Phil Sutter <phil@nwl.cc>
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>
---
net/sched/act_ipt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 89c41a1f35894..350e134cffb32 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -66,6 +66,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);
@@ -219,6 +220,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) {
--
2.7.2
next reply other threads:[~2016-03-03 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 13:34 Phil Sutter [this message]
2016-03-03 14:25 ` [net PATCH] net: sched: fix act_ipt for LOG target Jamal Hadi Salim
2016-03-07 3:58 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457012054-18012-1-git-send-email-psutter@redhat.com \
--to=psutter@redhat.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).