netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RFC] netfilter: don't assume NFPROTO_* are like PF_*
@ 2012-05-14 13:58 Alban Crequy
  2012-05-14 15:09 ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Alban Crequy @ 2012-05-14 13:58 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Patrick McHardy
  Cc: Vincent Sanders, Javier Martinez Canillas, netfilter-devel,
	netdev, Alban Crequy

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@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Vincent Sanders <vincent.sanders@collabora.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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-14 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 13:58 [PATCH] [RFC] netfilter: don't assume NFPROTO_* are like PF_* Alban Crequy
2012-05-14 15:09 ` Jan Engelhardt
2012-05-14 15:42   ` Alban Crequy
2012-05-14 19:06   ` Pablo Neira Ayuso

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).