diff options
author | Liping Zhang <zlpnobody@gmail.com> | 2017-06-17 22:51:09 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-06-29 12:47:02 -0400 |
commit | 91af6ba7ff16bd7e5919aedfe70aad73a3375619 (patch) | |
tree | 43d16e98124710b7b2d62a00da11cddade80eaf2 | |
parent | deaa0a976b829af8a7886d8e2528a675cbe4dac8 (diff) |
netfilter: ebt_nflog: fix unexpected truncated packet
"struct nf_loginfo li;" is a local variable, so we should set the flags
to 0 explicitly, else, packets maybe truncated unexpectedly when copied
to the userspace.
Fixes: 7643507fe8b5 ("netfilter: xt_NFLOG: nflog-range does not truncate packets")
Cc: Vishwanath Pai <vpai@akamai.com>
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/bridge/netfilter/ebt_nflog.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/netfilter/ebt_nflog.c b/net/bridge/netfilter/ebt_nflog.c index c1dc48686200..da1c2fdc08c8 100644 --- a/net/bridge/netfilter/ebt_nflog.c +++ b/net/bridge/netfilter/ebt_nflog.c | |||
@@ -30,6 +30,7 @@ ebt_nflog_tg(struct sk_buff *skb, const struct xt_action_param *par) | |||
30 | li.u.ulog.copy_len = info->len; | 30 | li.u.ulog.copy_len = info->len; |
31 | li.u.ulog.group = info->group; | 31 | li.u.ulog.group = info->group; |
32 | li.u.ulog.qthreshold = info->threshold; | 32 | li.u.ulog.qthreshold = info->threshold; |
33 | li.u.ulog.flags = 0; | ||
33 | 34 | ||
34 | nf_log_packet(net, PF_BRIDGE, xt_hooknum(par), skb, xt_in(par), | 35 | nf_log_packet(net, PF_BRIDGE, xt_hooknum(par), skb, xt_in(par), |
35 | xt_out(par), &li, "%s", info->prefix); | 36 | xt_out(par), &li, "%s", info->prefix); |