From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: [NETFILTER 05/05]: Fix NF_QUEUE_NR() parenthesis
Date: Wed, 27 Feb 2008 14:14:26 +0100 (MET) [thread overview]
Message-ID: <20080227131434.26831.91147.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080227131427.26831.51195.sendpatchset@localhost.localdomain>
[NETFILTER]: Fix NF_QUEUE_NR() parenthesis
Properly add parens around the macro argument. This is not needed by
the kernel but the macro is exported to userspace, so it shouldn't
make any assumptions.
Also use NF_VERDICT_BITS instead of NF_VERDICT_QBTIS for the left-shift
since thats whats logically correct.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 81d9aa76da78b14124638e761a4c0acab3d43508
tree d9ec5a1792894c1068aaf4eaab865a5b6001c939
parent c31b70def66807822dc973e66757507a5fd4c3b6
author Patrick McHardy <kaber@trash.net> Wed, 27 Feb 2008 13:23:58 +0100
committer Patrick McHardy <kaber@trash.net> Wed, 27 Feb 2008 13:23:58 +0100
include/linux/netfilter.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index b74b615..f0680c2 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -31,7 +31,7 @@
#define NF_VERDICT_QMASK 0xffff0000
#define NF_VERDICT_QBITS 16
-#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
/* only for userspace compatibility */
#ifndef __KERNEL__
next prev parent reply other threads:[~2008-02-27 13:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 13:14 [NETFILTER 00/05]: Netfilter fixes Patrick McHardy
2008-02-27 13:14 ` [NETFILTER 01/05]: nf_conntrack: fix smp_processor_id() in preemptible code warning Patrick McHardy
2008-02-27 20:09 ` David Miller
2008-02-27 13:14 ` [NETFILTER 02/05]: xt_conntrack: fix missing boolean clamping Patrick McHardy
2008-02-27 20:10 ` David Miller
2008-02-27 13:14 ` [NETFILTER 03/05]: xt_conntrack: fix IPv4 address comparison Patrick McHardy
2008-02-27 20:20 ` David Miller
2008-02-27 13:14 ` [NETFILTER 04/05]: nf_nat: always select same SNAT source for same host Patrick McHardy
2008-02-27 16:31 ` Patrick McHardy
2008-02-27 20:07 ` David Miller
2009-01-13 14:24 ` Bernhard Schmidt
2008-02-27 13:14 ` Patrick McHardy [this message]
2008-02-27 20:21 ` [NETFILTER 05/05]: Fix NF_QUEUE_NR() parenthesis David Miller
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=20080227131434.26831.91147.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@vger.kernel.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).