All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harald Welte <laforge@netfilter.org>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH] don't use __be16 in files used by userspace
Date: Fri, 7 Oct 2005 12:31:05 +0200	[thread overview]
Message-ID: <20051007103105.GF4719@rama> (raw)

[-- 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 --]

             reply	other threads:[~2005-10-07 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 10:31 Harald Welte [this message]
2005-10-07 20:24 ` [PATCH] don't use __be16 in files used by userspace David S. Miller
2005-10-07 22:15   ` Harald Welte
2005-10-10  4:47     ` David S. 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=20051007103105.GF4719@rama \
    --to=laforge@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.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 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.