All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: tgraf@suug.ch
Cc: Patrick McHardy <kaber@trash.net>,
	netfilter-devel@vger.kernel.org, philipc@snapgear.com
Subject: [LIBNL 05/09]: nfnetlink_log: only set hwproto if not zero
Date: Fri, 18 Jan 2008 17:55:54 +0100 (MET)	[thread overview]
Message-ID: <20080118165521.13385.17641.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080118165514.13385.44695.sendpatchset@localhost.localdomain>

commit 26b35449524246778d4a14c3805430797c29c039
Author: Patrick McHardy <kaber@trash.net>
Date:   Fri Jan 18 17:44:52 2008 +0100

    [LIBNL]: nfnetlink_log: only set hwproto if not zero
    
    The hwproto doesn't have its own attribute and is also present when
    not set. Don't set the attribute if its value is zero.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/lib/netfilter/log.c b/lib/netfilter/log.c
index a6bf3d5..a900927 100644
--- a/lib/netfilter/log.c
+++ b/lib/netfilter/log.c
@@ -86,7 +86,8 @@ struct nfnl_log *nfnlmsg_log_parse(struct nlmsghdr *nlh)
 	if (attr) {
 		struct nfulnl_msg_packet_hdr *hdr = nla_data(attr);
 
-		nfnl_log_set_hwproto(log, hdr->hw_protocol);
+		if (hdr->hw_protocol)
+			nfnl_log_set_hwproto(log, hdr->hw_protocol);
 		nfnl_log_set_hook(log, hdr->hook);
 	}
 

  parent reply	other threads:[~2008-01-18 16:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 16:55 [LIBNL 00/09]: Netfilter update + minor fixes Patrick McHardy
2008-01-18 16:55 ` [LIBNL 01/09]: Add if_vlan.h Patrick McHardy
2008-02-07 11:50   ` Thomas Graf
2008-01-18 16:55 ` [LIBNL 02/09]: Fix minor memleaks on exit Patrick McHardy
2008-02-07 11:52   ` Thomas Graf
2008-01-18 16:55 ` [LIBNL 03/09]: Generic netfilter stuff Patrick McHardy
2008-02-07 11:54   ` Thomas Graf
2008-01-18 16:55 ` [LIBNL 04/09]: Add nfnetlink_queue support Patrick McHardy
2008-02-07 12:00   ` Thomas Graf
2008-01-18 16:55 ` Patrick McHardy [this message]
2008-02-07 12:01   ` [LIBNL 05/09]: nfnetlink_log: only set hwproto if not zero Thomas Graf
2008-01-18 16:55 ` [LIBNL 06/09]: nfnetlink_log: support NUFLA_GID attribute Patrick McHardy
2008-02-07 12:03   ` Thomas Graf
2008-01-18 16:55 ` [LIBNL 07/09]: Split up nfnetlink_log into log and msg objects Patrick McHardy
2008-01-21  8:05   ` Philip Craig
2008-01-21  9:45     ` Patrick McHardy
2008-02-07 12:11   ` Thomas Graf
2008-01-18 16:55 ` [LIBNL 08/09]: Support conntrack add/delete/query requests Patrick McHardy
2008-01-21  8:39   ` Philip Craig
2008-01-21  9:46     ` Patrick McHardy
2008-01-21 10:53       ` Philip Craig
2008-01-21 10:55         ` Patrick McHardy
2008-02-07 12:14   ` Thomas Graf
2008-02-19 12:32     ` Patrick McHardy
2008-01-18 16:56 ` [LIBNL 09/09]: Install netfilter headers Patrick McHardy
2008-02-07 12:16   ` Thomas Graf

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=20080118165521.13385.17641.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=philipc@snapgear.com \
    --cc=tgraf@suug.ch \
    /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.