Skip to contentSkip to conversation

lockhelp.h missing

DISCUSSION Jérôme Poulin 3 participants 7 messages Jul 22, 2005 – Jul 26, 2005 2 messages not in the archive netfilter

lore
Share & tools
lore
#0 lore raw

I've got latest kernel 2.6.13-r1 with andrew morton patch mm1 and applied latest patch-o-matic-ng (2005-07-21 today) with ./runme extra which successfully applied.

When compiling the kernel I get some bad result (quoted some errors below) because of the lockhelp.h file missing in kernel builds greater or equal to 2.6.12.

This error repeats for each file including ip_conntrack_mms.h after removing lockhelp.h from the #include
---------------------
In file included from include/linux/netfilter_ipv4/ip_conntrack.h:94,

                 from net/ipv4/netfilter/ip_conntrack_h323_core.c:17:

include/linux/netfilter_ipv4/ip_conntrack_mms.h:8: warning: type defaults to int' in declaration of DECLARE_LOCK_EXTERN' include/linux/netfilter_ipv4/ip_conntrack_mms.h:8: warning: parameter names (without types) in function declaration include/linux/netfilter_ipv4/ip_conntrack_mms.h:8: warning: data definition has no type or storage class
------------

Same for this one after touch-ing the file so it doesn't generate errors about the missing #include
-----------
net/ipv4/netfilter/ip_conntrack_h323_h225.c: In function `h225_help':
net/ipv4/netfilter/ip_conntrack_h323_h225.c:382: warning: implicit declaration of function LOCK_BH' net/ipv4/netfilter/ip_conntrack_h323_h225.c:382: error: ip_h225_lock' undeclared (first use in this function) net/ipv4/netfilter/ip_conntrack_h323_h225.c:382: error: (Each undeclared identifier is reported only once net/ipv4/netfilter/ip_conntrack_h323_h225.c:382: error: for each function it appears in.) net/ipv4/netfilter/ip_conntrack_h323_h225.c:390: warning: implicit declaration of function `UNLOCK_BH' net/ipv4/netfilter/ip_conntrack_h323_h225.c: At top level:
net/ipv4/netfilter/ip_conntrack_h323_h225.c:28: warning:
'DECLARE_LOCK' declared `static' but never defined
make[3]: *** [net/ipv4/netfilter/ip_conntrack_h323_h225.o] Error 1
--------------

#1 lore raw
Quoted 10 lines · Jérôme Poulin

I've got latest kernel 2.6.13-r1 with andrew morton patch mm1 and applied latest patch-o-matic-ng (2005-07-21 today) with ./runme extra which successfully applied.

When compiling the kernel I get some bad result (quoted some errors below) because of the lockhelp.h file missing in kernel builds greater or equal to 2.6.12.

This error repeats for each file including ip_conntrack_mms.h after removing lockhelp.h from the #include

lockhelp.h got killed, some patches in pomng still need to be updated. I'll happily take patches ..

Regards
Patrick

#2 lore raw

Hi Jérôme, hi Patrick,

On Fri, Jul 22, 2005 at 07:56:10AM +0200, Patrick McHardy told us:

Quoted 2 lines

lockhelp.h got killed, some patches in pomng still need to be updated. I'll happily take patches ..

attached you'll find a patch against current pom-ng svn updating the mms-conntrack-nat helper for linux 2.6.12. Jérôme, could you please apply that patch with

cd /place/where/pom-ng/is
patch -p1 </location/of/mms-2.6.12.patch

then reapply that patch to your kernel, rebuild and test it?? I have compile-tested this patch with 2.6.13-rc3-mm1 but I don't have the possibility to test it.
If I find some more free time I'll try to take a look at the other patchlets.

kind regards

Sven

Quoted 5 lines

Regards
Patrick

--
Linux zion 2.6.13-rc3-mm1 #6 PREEMPT Mon Jul 18 19:42:52 CEST 2005 i686 athlon i386 GNU/Linux 14:49:02 up 6:57, 1 user, load average: 0.01, 0.30, 0.33

patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd +2 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd
@@ -0,0 +1,2 @@
+	/* insert conntrack helper private data (master) here */
+	struct ip_ct_mms_master ct_mms_info;
patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd_2 +2 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd_2 pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack.h.ladd_2
@@ -0,0 +1,2 @@
+/* Add protocol helper include file here */
+#include <linux/netfilter_ipv4/ip_conntrack_mms.h>
patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_mms.h +36 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_mms.h pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_mms.h
@@ -0,0 +1,36 @@
+#ifndef _IP_CONNTRACK_MMS_H
+#define _IP_CONNTRACK_MMS_H
+/* MMS tracking. */
+
+#ifdef __KERNEL__
+
+extern spinlock_t ip_mms_lock;
+
+#define MMS_PORT                         1755
+#define MMS_SRV_MSG_ID                   196610
+
+#define MMS_SRV_MSG_OFFSET               36
+#define MMS_SRV_UNICODE_STRING_OFFSET    60
+#define MMS_SRV_CHUNKLENLV_OFFSET        16
+#define MMS_SRV_CHUNKLENLM_OFFSET        32
+#define MMS_SRV_MESSAGELENGTH_OFFSET     8
+
+/* This structure is per expected connection */
+struct ip_ct_mms_expect {
+	u_int32_t offset;
+	u_int32_t len;
+	u_int32_t padding;
+	u_int16_t port;
+};
+
+/* This structure exists only once per master */
+struct ip_ct_mms_master {
+};
+
+struct ip_conntrack_expect;
+extern unsigned int (*ip_nat_mms_hook)(struct sk_buff **pskb,
+				       enum ip_conntrack_info ctinfo,
+				       const struct ip_ct_mms_expect *exp_mms_info,
+				       struct ip_conntrack_expect *exp);
+#endif
+#endif /* _IP_CONNTRACK_MMS_H */
patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_mms.c +352 -0

352 lines not on this page · raw message

patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_nat_mms.c +195 -0

195 lines not on this page · raw message

patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd +17 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd
@@ -0,0 +1,17 @@
+config IP_NF_NAT_MMS
+	tristate
+	depends on IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
+	default IP_NF_NAT if IP_NF_MMS=y
+	default m if IP_NF_MMS=m
+
+config IP_NF_MMS
+	tristate  'MMS protocol support'
+	depends on IP_NF_CONNTRACK
+	help
+	  Tracking MMS (Microsoft Windows Media Services) connections
+	  could be problematic if random ports are used to send the
+	  streaming content. This option allows users to track streaming
+	  connections over random UDP or TCP ports.
+	
+	  If you want to compile it as a module, say M here and read
+	  <file:Documentation/modules.txt>.  If unsure, say `Y'.
patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd +2 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd
@@ -0,0 +1,2 @@
+# NAT helpers 
+obj-$(CONFIG_IP_NF_NAT_MMS) += ip_nat_mms.o
patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd_2 +2 -0
diff -Nrup --exclude=.svn pom-ng-svn/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd_2 pom-ng-edit/patchlets/mms-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd_2
@@ -0,0 +1,2 @@
+# connection tracking helpers
+obj-$(CONFIG_IP_NF_MMS) += ip_conntrack_mms.o

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi Jérôme,

On Sat, Jul 23, 2005 at 05:38:23AM -0400, Jérôme Poulin told us:

Quoted 2 lines

Thanks, MMS compiled without any error or warning, h323 still misses the file on its side.

hmm...I can take a look at h323, I'll post a patch either later tonight or somewhen tomorrow. Have you already been able to verify that at least the updated mms-conntrack-nat works??

Kind regards,

Sven

Signature · 2 lines
Linux zion 2.6.13-rc3-mm1 #6 PREEMPT Mon Jul 18 19:42:52 CEST 2005 i686 athlon i386 GNU/Linux
 22:21:23 up 1 day,  5:31,  2 users,  load average: 0.02, 0.01, 0.00
#5 lore raw
In reply to a message not in the archive

Hi Jérôme,

On Sat, Jul 23, 2005 at 05:38:23AM -0400, Jérôme Poulin told us:

Quoted 2 lines

Thanks, MMS compiled without any error or warning, h323 still misses the file on its side.

here is a patch against current pom-ng svn to update h323-conntrack-nat for current kernels. Please apply to your pom-ng and test it. Compile- tested with 2.6.13-rc3-mm1.

Kind regards,

Sven

Signature · 2 lines
Linux zion 2.6.13-rc3-mm1 #6 PREEMPT Mon Jul 18 19:42:52 CEST 2005 i686 athlon i386 GNU/Linux
 22:50:36 up 1 day,  6:00,  2 users,  load average: 0.36, 0.48, 0.27
patchlets/h323-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_h323.h +38 -0
diff -Nrup pom-ng-svn/patchlets/h323-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_h323.h pom-ng-h323/patchlets/h323-conntrack-nat/linux-2.6.12/include/linux/netfilter_ipv4/ip_conntrack_h323.h
@@ -0,0 +1,38 @@
+#ifndef _IP_CONNTRACK_H323_H
+#define _IP_CONNTRACK_H323_H
+/* H.323 connection tracking. */
+
+#ifdef __KERNEL__
+
+/* Default H.225 port */
+#define H225_PORT	1720
+
+struct ip_conntrack_expect;
+struct ip_conntrack;
+struct ip_conntrack_helper;
+
+extern int (*ip_nat_h245_hook)(struct sk_buff **pskb,
+			       enum ip_conntrack_info ctinfo,
+			       unsigned int offset,
+			       struct ip_conntrack_expect *exp);
+
+extern int (*ip_nat_h225_hook)(struct sk_buff **pskb,
+			       enum ip_conntrack_info ctinfo,
+			       unsigned int offset,
+			       struct ip_conntrack_expect *exp);
+
+extern void (*ip_nat_h225_signal_hook)(struct sk_buff **pskb,
+				       struct ip_conntrack *ct,
+				       enum ip_conntrack_info ctinfo,
+				       unsigned int offset,
+				       int dir,
+				       int orig_dir);
+
+extern struct ip_conntrack_helper ip_conntrack_helper_h225;
+
+void ip_conntrack_h245_expect(struct ip_conntrack *new,
+			      struct ip_conntrack_expect *this);
+
+#endif /* __KERNEL__ */
+
+#endif /* _IP_CONNTRACK_H323_H */
patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/asn1_per.c +353 -0

353 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/asn1_per.h +83 -0

83 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323.c +447 -0

447 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323_core.c +37 -0
diff -Nrup pom-ng-svn/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323_core.c pom-ng-h323/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323_core.c
@@ -0,0 +1,37 @@
+/*
+ * H.323 connection tracking helper
+ * (c) 2005 Max Kellermann <[email protected]>
+ *
+ * Based on the 'brute force' H.323 connection tracking module by
+ * Jozsef Kadlecsik <[email protected]>
+ */
+
+
+#include <linux/module.h>
+#include <linux/netfilter.h>
+#include <linux/ip.h>
+#include <net/checksum.h>
+#include <net/tcp.h>
+
+#include <linux/netfilter_ipv4/ip_conntrack.h>
+#include <linux/netfilter_ipv4/ip_conntrack_core.h>
+#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
+#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
+#include <linux/netfilter_ipv4/ip_conntrack_h323.h>
+
+MODULE_AUTHOR("Max Kellermann <[email protected]>");
+MODULE_DESCRIPTION("H.323 connection tracking helper");
+MODULE_LICENSE("GPL");
+
+static int __init init(void)
+{
+	return ip_conntrack_helper_register(&ip_conntrack_helper_h225);
+}
+
+static void __exit fini(void)
+{
+	ip_conntrack_helper_unregister(&ip_conntrack_helper_h225);
+}
+
+module_init(init);
+module_exit(fini);
patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323_h225.c +405 -0

405 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_conntrack_h323_h245.c +959 -0

959 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/ip_nat_h323.c +196 -0

196 lines not on this page · raw message

patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd +17 -0
diff -Nrup pom-ng-svn/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd pom-ng-h323/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Kconfig.ladd
@@ -0,0 +1,17 @@
+config IP_NF_NAT_H323
+	tristate
+	depends on IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
+	default IP_NF_NAT if IP_NF_H323=y
+	default m if IP_NF_H323=m
+
+config IP_NF_H323
+	tristate  'H.323 (netmeeting) support'
+	depends on IP_NF_CONNTRACK
+	help
+	  H.323 is a standard signalling protocol used by teleconferencing
+	  softwares like netmeeting. With the ip_conntrack_h323 and
+	  the ip_nat_h323 modules you can support the protocol on a connection
+	  tracking/NATing firewall.
+	
+	  If you want to compile it as a module, say 'M' here and read
+	  Documentation/modules.txt.  If unsure, say 'N'.
patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd +7 -0
diff -Nrup pom-ng-svn/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd pom-ng-h323/patchlets/h323-conntrack-nat/linux-2.6.12/net/ipv4/netfilter/Makefile.ladd
@@ -0,0 +1,7 @@
+obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
+ 
+# H.323 support
+obj-$(CONFIG_IP_NF_H323) += ip_conntrack_h323.o
+ip_conntrack_h323-objs := ip_conntrack_h323_core.o ip_conntrack_h323_h225.o ip_conntrack_h323_h245.o asn1_per.o
+obj-$(CONFIG_IP_NF_NAT_H323) += ip_nat_h323.o
+
#6 lore raw

Just finished testing and the 2 patches works perfectly on 2.6.13-rc3-mm1 ! Apply with no warning and works, thanks :)

Quoted 22 lines · Sven Schuster

Hi Jérôme,

On Sat, Jul 23, 2005 at 05:38:23AM -0400, Jérôme Poulin told us:

Quoted 2 lines

Thanks, MMS compiled without any error or warning, h323 still misses the file on its side.

here is a patch against current pom-ng svn to update h323-conntrack-nat for current kernels. Please apply to your pom-ng and test it. Compile- tested with 2.6.13-rc3-mm1.

Kind regards,

Sven

--
Linux zion 2.6.13-rc3-mm1 #6 PREEMPT Mon Jul 18 19:42:52 CEST 2005 i686 athlon i386 GNU/Linux
22:50:36 up 1 day, 6:00, 2 users, load average: 0.36, 0.48, 0.27

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hi Jérôme,

On Tue, Jul 26, 2005 at 02:23:57PM -0400, Jérôme Poulin told us:

Quoted 2 lines

Just finished testing and the 2 patches works perfectly on 2.6.13-rc3-mm1 ! Apply with no warning and works, thanks :)

nice to hear that it works. So I can now send the patches for applying to svn :-)

Sven

Signature · 2 lines
Linux zion 2.6.13-rc3-mm1 #12 PREEMPT Sun Jul 24 02:04:45 CEST 2005 i686 athlon i386 GNU/Linux
 20:45:43 up 1 day, 20:55,  1 user,  load average: 0.00, 0.00, 0.00