All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't use __be16 in files used by userspace
@ 2005-10-07 10:31 Harald Welte
  2005-10-07 20:24 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Harald Welte @ 2005-10-07 10:31 UTC (permalink / raw)
  To: Netfilter Development Mailinglist; +Cc: David Miller

[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]

Hi Dave!

This (or a different solution such as 
"#ifndef __KERNEL__ #define __be16 #endif" needs to go in before 2.6.14
is released, since otherwise we'd break userspace compilation :(

Please apply, thanks.


[NETFILTER] do not use __be16 in headerfile that is used by userspace

__be16 is not defined in userspace, and therefore iptables cannot be
compiled with such types in ip_conntrack_tuple.h.  Yes, we can add a bogus
#define to iptables userspace, but we can only do so for new releases, not
for old ones.  Since we do not want to loose the ability to compile old
iptables programs on new kernels, we revert the change.

Signed-off-by: Harald Welte <laforge@netfilter.org>

---
commit 4714eea267d67e65aabb6518cbfa81b8c45c2147
tree caf15c3b67ea6595db868305e7042cbea3f01edf
parent d5b3f0a9fdcf7881d3b6efedd862aef6d561db03
author Harald Welte <laforge@netfilter.org> Fri, 07 Oct 2005 12:59:02 +0200
committer Harald Welte <laforge@netfilter.org> Fri, 07 Oct 2005 12:59:02 +0200

 include/linux/netfilter_ipv4/ip_conntrack_tuple.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
--- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -17,7 +17,7 @@ union ip_conntrack_manip_proto
 	u_int16_t all;
 
 	struct {
-		__be16 port;
+		u_int16_t port;
 	} tcp;
 	struct {
 		u_int16_t port;
@@ -29,7 +29,7 @@ union ip_conntrack_manip_proto
 		u_int16_t port;
 	} sctp;
 	struct {
-		__be16 key;	/* key is 32bit, pptp only uses 16 */
+		u_int16_t key;	/* key is 32bit, pptp only uses 16 */
 	} gre;
 };
 
@@ -65,7 +65,7 @@ struct ip_conntrack_tuple
 				u_int16_t port;
 			} sctp;
 			struct {
-				__be16 key;	/* key is 32bit, 
+				u_int16_t key;	/* key is 32bit, 
 						 * pptp only uses 16 */
 			} gre;
 		} u;
-- 
- Harald Welte <laforge@netfilter.org>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-10-10  4:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-07 10:31 [PATCH] don't use __be16 in files used by userspace Harald Welte
2005-10-07 20:24 ` David S. Miller
2005-10-07 22:15   ` Harald Welte
2005-10-10  4:47     ` David S. Miller

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.