netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfnetlink_log: do not expose NFULNL_COPY_DISABLED to user-space
@ 2010-07-14 11:49 Pablo Neira Ayuso
  2010-07-15  9:30 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2010-07-14 11:49 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber, eric.dumazet

This patch moves NFULNL_COPY_PACKET definition from
linux/netfilter/nfnetlink_log.h to net/netfilter/nfnetlink_log.h
since this copy mode is only for internal use.

I have also changed the value from 0x03 to 0xff. Thus, we avoid
a gap from user-space that may confuse users if we add new
copy modes in the future.

This change was introduced in:
http://www.spinics.net/lists/netfilter-devel/msg13535.html

Since this change is not included in any stable Linux kernel,
I think it's safe to make this change now. Anyway, this copy
mode does not make any sense from user-space, so this patch
should not break any existing setup.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 include/linux/netfilter/nfnetlink_log.h |    2 +-
 include/net/netfilter/nfnetlink_log.h   |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h
index 1d0b84a..ea9b8d3 100644
--- a/include/linux/netfilter/nfnetlink_log.h
+++ b/include/linux/netfilter/nfnetlink_log.h
@@ -89,7 +89,7 @@ enum nfulnl_attr_config {
 #define NFULNL_COPY_NONE	0x00
 #define NFULNL_COPY_META	0x01
 #define NFULNL_COPY_PACKET	0x02
-#define NFULNL_COPY_DISABLED	0x03
+/* 0xff is reserved, don't use it for new copy modes. */
 
 #define NFULNL_CFG_F_SEQ	0x0001
 #define NFULNL_CFG_F_SEQ_GLOBAL	0x0002
diff --git a/include/net/netfilter/nfnetlink_log.h b/include/net/netfilter/nfnetlink_log.h
index b0569ff..e2dec42 100644
--- a/include/net/netfilter/nfnetlink_log.h
+++ b/include/net/netfilter/nfnetlink_log.h
@@ -10,5 +10,7 @@ nfulnl_log_packet(u_int8_t pf,
 		  const struct nf_loginfo *li_user,
 		  const char *prefix);
 
+#define NFULNL_COPY_DISABLED    0xff
+
 #endif /* _KER_NFNETLINK_LOG_H */
 


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

* Re: [PATCH] nfnetlink_log: do not expose NFULNL_COPY_DISABLED to user-space
  2010-07-14 11:49 [PATCH] nfnetlink_log: do not expose NFULNL_COPY_DISABLED to user-space Pablo Neira Ayuso
@ 2010-07-15  9:30 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2010-07-15  9:30 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, eric.dumazet

Am 14.07.2010 13:49, schrieb Pablo Neira Ayuso:
> This patch moves NFULNL_COPY_PACKET definition from
> linux/netfilter/nfnetlink_log.h to net/netfilter/nfnetlink_log.h
> since this copy mode is only for internal use.
> 
> I have also changed the value from 0x03 to 0xff. Thus, we avoid
> a gap from user-space that may confuse users if we add new
> copy modes in the future.
> 
> This change was introduced in:
> http://www.spinics.net/lists/netfilter-devel/msg13535.html
> 
> Since this change is not included in any stable Linux kernel,
> I think it's safe to make this change now. Anyway, this copy
> mode does not make any sense from user-space, so this patch
> should not break any existing setup.
> 

Applied, thanks Pablo.

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

end of thread, other threads:[~2010-07-15  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 11:49 [PATCH] nfnetlink_log: do not expose NFULNL_COPY_DISABLED to user-space Pablo Neira Ayuso
2010-07-15  9:30 ` Patrick McHardy

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