]> Git Repo - linux.git/commitdiff
netfilter: ebt_nflog: fix unexpected truncated packet
authorLiping Zhang <[email protected]>
Sun, 18 Jun 2017 02:51:09 +0000 (10:51 +0800)
committerPablo Neira Ayuso <[email protected]>
Thu, 29 Jun 2017 16:47:02 +0000 (18:47 +0200)
"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 <[email protected]>
Signed-off-by: Liping Zhang <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
net/bridge/netfilter/ebt_nflog.c

index c1dc486862002f4f492d81d91e2165c4e9084ed2..da1c2fdc08c8915ba6a3cfeb1cdc148fc10d7523 100644 (file)
@@ -30,6 +30,7 @@ ebt_nflog_tg(struct sk_buff *skb, const struct xt_action_param *par)
        li.u.ulog.copy_len = info->len;
        li.u.ulog.group = info->group;
        li.u.ulog.qthreshold = info->threshold;
+       li.u.ulog.flags = 0;
 
        nf_log_packet(net, PF_BRIDGE, xt_hooknum(par), skb, xt_in(par),
                      xt_out(par), &li, "%s", info->prefix);
This page took 0.058943 seconds and 4 git commands to generate.