lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1337003909-2582-1-git-send-email-alban.crequy@collabora.co.uk>
Date:	Mon, 14 May 2012 14:58:29 +0100
From:	Alban Crequy <alban.crequy@...labora.co.uk>
To:	Pablo Neira Ayuso <pablo@...filter.org>,
	Patrick McHardy <kaber@...sh.net>
Cc:	Vincent Sanders <vincent.sanders@...labora.co.uk>,
	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
	Alban Crequy <alban.crequy@...labora.co.uk>
Subject: [PATCH] [RFC] netfilter: don't assume NFPROTO_* are like PF_*

With this patch, NFPROTO_* constants don't have the same values as PF_*
constants.

Benefit: it makes NFPROTO_NUMPROTO smaller and saves space as arrays are
smaller.

Issues: might have missed a conversion. I grepped NF_HOOK, nf_register_hook,
nf_register_hooks, and xt_hook_link. So it is probably fine.

NFPROTO_* constants were introduced by commit 7e9c6e.

Signed-off-by: Alban Crequy <alban.crequy@...labora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Reviewed-by: Vincent Sanders <vincent.sanders@...labora.co.uk>
---
 include/linux/netfilter.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 29734be..89afadb 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -62,11 +62,11 @@ enum nf_inet_hooks {
 
 enum {
 	NFPROTO_UNSPEC =  0,
-	NFPROTO_IPV4   =  2,
-	NFPROTO_ARP    =  3,
-	NFPROTO_BRIDGE =  7,
-	NFPROTO_IPV6   = 10,
-	NFPROTO_DECNET = 12,
+	NFPROTO_IPV4,
+	NFPROTO_ARP,
+	NFPROTO_BRIDGE,
+	NFPROTO_IPV6,
+	NFPROTO_DECNET,
 	NFPROTO_NUMPROTO,
 };
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ