[netfilter-cvslog] r3255 - in
trunk/patch-o-matic-ng/pptp-conntrack-nat: .
linux-2.6/net/ipv4/netfilter
/C=DE/ST=Berlin/L=Berlin/O=Netfilter
/C=DE/ST=Berlin/L=Berlin/O=Netfilter
Fri Oct 22 17:37:54 CEST 2004
Author: /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge at netfilter.org
Date: 2004-10-22 17:37:53 +0200 (Fri, 22 Oct 2004)
New Revision: 3255
Modified:
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6.patch
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_pptp.c
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_proto_gre.c
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c
Log:
forward-port my '32bit l4 tuple expansion' changes from 2.4.x
Modified: trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_pptp.c
===================================================================
--- trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_pptp.c 2004-10-22 15:34:29 UTC (rev 3254)
+++ trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_pptp.c 2004-10-22 15:37:53 UTC (rev 3255)
@@ -182,16 +182,12 @@
exp.tuple.src.u.gre.key = htonl(ntohs(peer_callid));
exp.tuple.dst.ip = master->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip;
exp.tuple.dst.u.gre.key = htonl(ntohs(callid));
- exp.tuple.dst.u.gre.protocol = __constant_htons(GRE_PROTOCOL_PPTP);
- exp.tuple.dst.u.gre.version = GRE_VERSION_PPTP;
exp.tuple.dst.protonum = IPPROTO_GRE;
exp.mask.src.ip = 0xffffffff;
exp.mask.src.u.all = 0;
exp.mask.dst.u.all = 0;
exp.mask.dst.u.gre.key = 0xffffffff;
- exp.mask.dst.u.gre.version = 0xff;
- exp.mask.dst.u.gre.protocol = 0xffff;
exp.mask.dst.ip = 0xffffffff;
exp.mask.dst.protonum = 0xffff;
Modified: trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_proto_gre.c
===================================================================
--- trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_proto_gre.c 2004-10-22 15:34:29 UTC (rev 3254)
+++ trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_conntrack_proto_gre.c 2004-10-22 15:37:53 UTC (rev 3255)
@@ -59,9 +59,7 @@
": " format, ## args)
#define DUMP_TUPLE_GRE(x) printk("%u.%u.%u.%u:0x%x -> %u.%u.%u.%u:0x%x:%u:0x%x\n", \
NIPQUAD((x)->src.ip), ntohl((x)->src.u.gre.key), \
- NIPQUAD((x)->dst.ip), ntohl((x)->dst.u.gre.key), \
- (x)->dst.u.gre.version, \
- ntohs((x)->dst.u.gre.protocol))
+ NIPQUAD((x)->dst.ip), ntohl((x)->dst.u.gre.key))
#else
#define DEBUGP(x, args...)
#define DUMP_TUPLE_GRE(x)
@@ -168,9 +166,6 @@
static int gre_invert_tuple(struct ip_conntrack_tuple *tuple,
const struct ip_conntrack_tuple *orig)
{
- tuple->dst.u.gre.protocol = orig->dst.u.gre.protocol;
- tuple->dst.u.gre.version = orig->dst.u.gre.version;
-
tuple->dst.u.gre.key = orig->src.u.gre.key;
tuple->src.u.gre.key = orig->dst.u.gre.key;
@@ -192,9 +187,6 @@
if (!grehdr || !pgrehdr)
return 0;
- tuple->dst.u.gre.version = grehdr->version;
- tuple->dst.u.gre.protocol = grehdr->protocol;
-
switch (grehdr->version) {
case GRE_VERSION_1701:
if (!grehdr->key) {
@@ -214,7 +206,7 @@
default:
printk(KERN_WARNING "unknown GRE version %hu\n",
- tuple->dst.u.gre.version);
+ grehdr->version);
return 0;
}
@@ -233,9 +225,7 @@
static unsigned int gre_print_tuple(char *buffer,
const struct ip_conntrack_tuple *tuple)
{
- return sprintf(buffer, "version=%d protocol=0x%04x srckey=0x%x dstkey=0x%x ",
- tuple->dst.u.gre.version,
- ntohs(tuple->dst.u.gre.protocol),
+ return sprintf(buffer, "srckey=0x%x dstkey=0x%x ",
ntohl(tuple->src.u.gre.key),
ntohl(tuple->dst.u.gre.key));
}
Modified: trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c
===================================================================
--- trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c 2004-10-22 15:34:29 UTC (rev 3254)
+++ trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c 2004-10-22 15:37:53 UTC (rev 3255)
@@ -77,24 +77,10 @@
if (!(range->flags & IP_NAT_RANGE_PROTO_SPECIFIED)) {
- switch (tuple->dst.u.gre.version) {
- case 0:
- DEBUGP("NATing GRE version 0 (ct=%p)\n",
- conntrack);
- min = 1;
- range_size = 0xffffffff;
- break;
- case GRE_VERSION_PPTP:
- DEBUGP("%p: NATing GRE PPTP\n",
- conntrack);
- min = 1;
- range_size = 0xffff;
- break;
- default:
- printk(KERN_WARNING "nat_gre: unknown GRE version\n");
- return 0;
- break;
- }
+ DEBUGP("%p: NATing GRE PPTP\n", conntrack);
+ min = 1;
+ range_size = 0xffff;
+ break;
} else {
min = ntohl(range->min.gre.key);
@@ -169,14 +155,6 @@
{
unsigned int len = 0;
- if (mask->dst.u.gre.version)
- len += sprintf(buffer + len, "version=%d ",
- ntohs(match->dst.u.gre.version));
-
- if (mask->dst.u.gre.protocol)
- len += sprintf(buffer + len, "protocol=0x%x ",
- ntohs(match->dst.u.gre.protocol));
-
if (mask->src.u.gre.key)
len += sprintf(buffer + len, "srckey=0x%x ",
ntohl(match->src.u.gre.key));
Modified: trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6.patch
===================================================================
--- trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6.patch 2004-10-22 15:34:29 UTC (rev 3254)
+++ trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6.patch 2004-10-22 15:37:53 UTC (rev 3255)
@@ -25,17 +25,15 @@
union {
/* Add other protocols here. */
- u_int16_t all;
-+ u_int64_t all;
++ u_int32_t all;
struct {
u_int16_t port;
-@@ -55,6 +58,11 @@
+@@ -55,6 +58,9 @@
struct {
u_int8_t type, code;
} icmp;
+ struct {
-+ u_int16_t protocol;
-+ u_int8_t version;
+ u_int32_t key;
+ } gre;
} u;
More information about the netfilter-cvslog
mailing list