All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Caputo <ccaputo@alt.net>
To: Liping Zhang <zlpnobody@gmail.com>
Cc: Vishwanath Pai <vpai@akamai.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Justin Piszcz <jpiszcz@lucidpixels.com>,
	linux-kernel@vger.kernel.org,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: kernel v4.8: iptables logs are truncated with the 4.8 kernel?
Date: Tue, 11 Oct 2016 03:57:52 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1610110353160.3698@nacho.alt.net> (raw)
In-Reply-To: <CAML_gOeNcgH-26iL6W5GDf0Ke0Sbpe9MTSULTvTnuiR9Cj_ZLA@mail.gmail.com>

On Tue, 11 Oct 2016, Liping Zhang wrote:
> Yes, thanks for clarifying this. There's a bug in kernel, can you try
> this patch:
> 
> diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c
> index 018eed7..8c069b4 100644
> --- a/net/netfilter/xt_NFLOG.c
> +++ b/net/netfilter/xt_NFLOG.c
> @@ -32,6 +32,7 @@ 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;
> 
>         if (info->flags & XT_NFLOG_F_COPY_LEN)
>                 li.u.ulog.flags |= NF_LOG_F_COPY_LEN;

I have tested the above patch with 4.8.1, with and without nflog-size 
defined in an iptables configuration, and it works well.

The ulogd-2.0.5 segfaults no longer happen when nflog-size is not present 
in a target.

I recommend this fix.

Thanks,
Chris

  reply	other threads:[~2016-10-11  3:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 22:02 kernel v4.8: iptables logs are truncated with the 4.8 kernel? Justin Piszcz
2016-10-05  0:58 ` Liping Zhang
2016-10-05  8:56   ` Justin Piszcz
2016-10-10  7:02 ` Chris Caputo
2016-10-10 12:21   ` Liping Zhang
2016-10-10 18:33     ` Chris Caputo
2016-10-11  0:58       ` Liping Zhang
2016-10-11  3:57         ` Chris Caputo [this message]
2016-10-11  5:03           ` Liping Zhang

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=alpine.LNX.2.00.1610110353160.3698@nacho.alt.net \
    --to=ccaputo@alt.net \
    --cc=ccaputo-dated-1486526273.d9d440@alt.net \
    --cc=jpiszcz@lucidpixels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=vpai@akamai.com \
    --cc=zlpnobody@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.