netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Jacob <jacob@internet24.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: ulogd2/NFLOG: nfnetlink_log: error creating log nlmsg
Date: Fri, 22 May 2009 14:12:41 +0200	[thread overview]
Message-ID: <20090522121241.GA28340@internet24.de> (raw)
In-Reply-To: <4A158E6A.8090705@netfilter.org>

On Thu, May 21, 2009 at 07:24:58PM +0200, Pablo Neira Ayuso wrote:
> Thomas Jacob wrote:
> > Bug? Feature? If it's the latter, how can I prevent this from
> > happening?
> 
> Does this patch helps? It seems that we're missing to add the size of
> the hardware address since 2.6.27.

Thanks for the quick reply and the patch. Unfortunately I haven't found a way
to reproduce this problem in a lab environment yet, so I can't confirm
whether or not it does anything. Originally the issue
occurred when hot-replacing an older system with one that
runs NFLOG/ulogd2 and the versions listed, thereby generating lots
of invalid packets probably (which should have been logged) as well
as some intentional drops (Packet rate at the time maybe was 30kpps).

Any hints as to what kind of traffic I should be generating to create
a situation that your patch might be a remedy for ?

   Thanks, 
       Thomas

> -- 
> "Los honestos son inadaptados sociales" -- Les Luthiers

> diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
> index fd326ac..66a6dd5 100644
> --- a/net/netfilter/nfnetlink_log.c
> +++ b/net/netfilter/nfnetlink_log.c
> @@ -581,6 +581,12 @@ nfulnl_log_packet(u_int8_t pf,
>  		+ nla_total_size(sizeof(struct nfulnl_msg_packet_hw))
>  		+ nla_total_size(sizeof(struct nfulnl_msg_packet_timestamp));
>  
> +	if (in && skb_mac_header_was_set(skb)) {
> +		size +=   nla_total_size(skb->dev->hard_header_len)
> +			+ nla_total_size(sizeof(u_int16_t))	/* hwtype */
> +			+ nla_total_size(sizeof(u_int16_t));	/* hwlen */
> +	}
> +
>  	spin_lock_bh(&inst->lock);
>  
>  	if (inst->flags & NFULNL_CFG_F_SEQ)


  reply	other threads:[~2009-05-22 12:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 18:05 ulogd2/NFLOG: nfnetlink_log: error creating log nlmsg Thomas Jacob
2009-05-21 17:24 ` Pablo Neira Ayuso
2009-05-22 12:12   ` Thomas Jacob [this message]
2009-06-05 14:01     ` Thomas Jacob
2009-06-06  6:57       ` Pablo Neira Ayuso

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=20090522121241.GA28340@internet24.de \
    --to=jacob@internet24.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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).