Skip to contentSkip to conversation

conntrack-mms / keep hook private.

PATCH In review Pawel Sikora 2 participants 2 messages May 3, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conntrack-mms / keep hook private.

Hi All,

IMHO the hook should be a private part of a kernel (similar to other conntrack modules). Attached patch hide the mms hook from userland.

Regards,
Pawel.

Signature · 3 lines
The only thing necessary for the triumph of evil
  is for good men to do nothing.
                                           - Edmund Burke
linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_mms.h +2 -0
Index: mms-conntrack-nat/linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_mms.h
===================================================================
@@ -30,9 +30,11 @@
 };
 
 struct ip_conntrack_expect;
+#ifdef __KERNEL__
 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 */
#1 lore raw
Quoted 5 lines · Pawel Sikora

Hi All,

IMHO the hook should be a private part of a kernel (similar to other conntrack modules). Attached patch hide the mms hook from userland.

I agree, but in fact nothing of the entire file should be visible, so I've applied this patch instead.

include/linux/netfilter_ipv4/ip_conntrack_mms.h +1 -2
Index: linux-2.6.11/include/linux/netfilter_ipv4/ip_conntrack_mms.h
===================================================================
@@ -15,7 +15,6 @@
 #define MMS_SRV_CHUNKLENLV_OFFSET        16
 #define MMS_SRV_CHUNKLENLM_OFFSET        32
 #define MMS_SRV_MESSAGELENGTH_OFFSET     8
-#endif
 
 /* This structure is per expected connection */
 struct ip_ct_mms_expect {
@@ -34,5 +33,5 @@
 				       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 */