[netfilter-cvslog] r3846 - in trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11: include/linux/netfilter_ipv4 net/ipv4/netfilter

laforge at netfilter.org laforge at netfilter.org
Sun Apr 10 22:42:52 CEST 2005


Author: laforge at netfilter.org
Date: 2005-04-10 22:42:52 +0200 (Sun, 10 Apr 2005)
New Revision: 3846

Modified:
   trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_h323.h
   trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_h323.c
   trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_nat_h323.c
Log:
get rid of my port, replace it with Max Kellermann's 


Modified: trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_h323.h
===================================================================
--- trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_h323.h	2005-04-10 20:40:40 UTC (rev 3845)
+++ trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_h323.h	2005-04-10 20:42:52 UTC (rev 3846)
@@ -32,6 +32,9 @@
 				       int dir,
 				       int orig_dir);
 
+void ip_conntrack_h245_expect(struct ip_conntrack *new,
+			      struct ip_conntrack_expect *this);
+
 #endif /* __KERNEL__ */
 
 #endif /* _IP_CONNTRACK_H323_H */

Modified: trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_h323.c
===================================================================
--- trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_h323.c	2005-04-10 20:40:40 UTC (rev 3845)
+++ trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_h323.c	2005-04-10 20:42:52 UTC (rev 3846)
@@ -169,14 +169,15 @@
 	.help = h245_help
 };
 
-static void h225_expect(struct ip_conntrack *new,
-			struct ip_conntrack_expect *this)
+void ip_conntrack_h245_expect(struct ip_conntrack *new,
+			      struct ip_conntrack_expect *this)
 {
 	WRITE_LOCK(&ip_conntrack_lock);
 	new->helper = &h245;
 	DEBUGP("h225_expect: helper for %p added\n", new);
 	WRITE_UNLOCK(&ip_conntrack_lock);
 }
+EXPORT_SYMBOL_GPL(ip_conntrack_h245_expect);
 
 /* FIXME: This should be in userspace.  Later. */
 static int h225_help(struct sk_buff **pskb,
@@ -257,7 +258,7 @@
 					{ { 0xFFFFFFFF, { 0 } },
 					  { 0xFFFFFFFF, { .tcp = { 0xFFFF } }, 0xFF }});
 
-				exp->expectfn = h225_expect;
+				exp->expectfn = ip_conntrack_h245_expect;
 				exp->master = ct;
 
 				if (ip_nat_h225_hook != NULL) {

Modified: trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_nat_h323.c
===================================================================
--- trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_nat_h323.c	2005-04-10 20:40:40 UTC (rev 3845)
+++ trunk/patch-o-matic-ng/h323-conntrack-nat/linux-2.6.11/net/ipv4/netfilter/ip_nat_h323.c	2005-04-10 20:42:52 UTC (rev 3846)
@@ -65,6 +65,18 @@
 				 (const char*)&newdata, sizeof(newdata));
 }
 
+/**
+ * This conntrack expect function replaces ip_conntrack_h245_expect()
+ * which was set by ip_conntrack_h323.c. It calls both
+ * ip_nat_follow_master() and ip_conntrack_h245_expect().
+ */
+static void ip_nat_h245_expect(struct ip_conntrack *new,
+			       struct ip_conntrack_expect *this)
+{
+	ip_nat_follow_master(new, this);
+	ip_conntrack_h245_expect(new, this);
+}
+
 static int ip_nat_h225(struct sk_buff **pskb,
 		       enum ip_conntrack_info ctinfo,
 		       unsigned int offset,
@@ -86,7 +98,8 @@
 
 	/* When you see the packet, we need to NAT it the same as the
 	 * this one. */
-	exp->expectfn = ip_nat_follow_master;
+	BUG_ON(exp->expectfn != ip_conntrack_h245_expect);
+	exp->expectfn = ip_nat_h245_expect;
 
 	/* Try to get same port: if not, try to change it. */
 	for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {




More information about the netfilter-cvslog mailing list