[netfilter-cvslog] r6291 - in trunk/conntrack: . extensions src

pablo at netfilter.org pablo at netfilter.org
Sun Dec 4 02:07:28 CET 2005


Author: pablo at netfilter.org
Date: 2005-12-04 02:07:17 +0100 (Sun, 04 Dec 2005)
New Revision: 6291

Modified:
   trunk/conntrack/ChangeLog
   trunk/conntrack/extensions/libct_proto_icmp.c
   trunk/conntrack/extensions/libct_proto_sctp.c
   trunk/conntrack/src/conntrack.c
Log:
o Restore include "conntrack.h" in ICMP handler
o Add missing flags coversion in SCTP handler



Modified: trunk/conntrack/ChangeLog
===================================================================
--- trunk/conntrack/ChangeLog	2005-12-03 22:50:27 UTC (rev 6290)
+++ trunk/conntrack/ChangeLog	2005-12-04 01:07:17 UTC (rev 6291)
@@ -5,7 +5,6 @@
 	o Update manpage
 	o Missing static function declaration in the protocol handlers
 	o Use protocol flags defined in libnetfilter_conntrack
-	o Kill leftover #include "conntrack.h" in the ICMP helper
 	o Bumped version to 0.991
 
 2005-11-22

Modified: trunk/conntrack/extensions/libct_proto_icmp.c
===================================================================
--- trunk/conntrack/extensions/libct_proto_icmp.c	2005-12-03 22:50:27 UTC (rev 6290)
+++ trunk/conntrack/extensions/libct_proto_icmp.c	2005-12-04 01:07:17 UTC (rev 6291)
@@ -15,6 +15,7 @@
 #include <netinet/ip_icmp.h>
 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
 #include <libnetfilter_conntrack/libnetfilter_conntrack_icmp.h>
+#include "conntrack.h"
 
 static struct option opts[] = {
 	{"icmp-type", 1, 0, '1'},

Modified: trunk/conntrack/extensions/libct_proto_sctp.c
===================================================================
--- trunk/conntrack/extensions/libct_proto_sctp.c	2005-12-03 22:50:27 UTC (rev 6290)
+++ trunk/conntrack/extensions/libct_proto_sctp.c	2005-12-04 01:07:17 UTC (rev 6291)
@@ -56,25 +56,25 @@
 		case '1':
 			if (optarg) {
 				orig->l4src.sctp.port = htons(atoi(optarg));
-				*flags |= ORIG_SPORT;
+				*flags |= SCTP_ORIG_SPORT;
 			}
 			break;
 		case '2':
 			if (optarg) {
 				orig->l4dst.sctp.port = htons(atoi(optarg));
-				*flags |= ORIG_DPORT;
+				*flags |= SCTP_ORIG_DPORT;
 			}
 			break;
 		case '3':
 			if (optarg) {
 				reply->l4src.sctp.port = htons(atoi(optarg));
-				*flags |= REPL_SPORT;
+				*flags |= SCTP_REPL_SPORT;
 			}
 			break;
 		case '4':
 			if (optarg) {
 				reply->l4dst.sctp.port = htons(atoi(optarg));
-				*flags |= REPL_DPORT;
+				*flags |= SCTP_REPL_DPORT;
 			}
 			break;
 		case '5':
@@ -92,7 +92,7 @@
 					printf("doh?\n");
 					return 0;
 				}
-				*flags |= STATE;
+				*flags |= SCTP_STATE;
 			}
 			break;
 	}
@@ -106,23 +106,23 @@
 {
 	int ret = 0;
 	
-	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
-	    && !(flags & (REPL_SPORT|REPL_DPORT))) {
+	if ((flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT)) 
+	    && !(flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT))) {
 		reply->l4src.sctp.port = orig->l4dst.sctp.port;
 		reply->l4dst.sctp.port = orig->l4src.sctp.port;
 		ret = 1;
-	} else if (!(flags & (ORIG_SPORT|ORIG_DPORT))
-	            && (flags & (REPL_SPORT|REPL_DPORT))) {
+	} else if (!(flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT))
+	            && (flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT))) {
 		orig->l4src.sctp.port = reply->l4dst.sctp.port;
 		orig->l4dst.sctp.port = reply->l4src.sctp.port;
 		ret = 1;
 	}
-	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
-	    && ((flags & (REPL_SPORT|REPL_DPORT))))
+	if ((flags & (SCTP_ORIG_SPORT|SCTP_ORIG_DPORT)) 
+	    && ((flags & (SCTP_REPL_SPORT|SCTP_REPL_DPORT))))
 		ret = 1;
 
 	/* --state is missing and we are trying to create a conntrack */
-	if (ret && (command & CT_CREATE) && (!(flags & STATE)))
+	if (ret && (command & CT_CREATE) && (!(flags & SCTP_STATE)))
 		ret = 0;
 
 	return ret;

Modified: trunk/conntrack/src/conntrack.c
===================================================================
--- trunk/conntrack/src/conntrack.c	2005-12-03 22:50:27 UTC (rev 6290)
+++ trunk/conntrack/src/conntrack.c	2005-12-04 01:07:17 UTC (rev 6291)
@@ -1035,10 +1035,11 @@
 				.protoflag = extra_flags
 			};
 			nfct_register_callback(cth,
-				nfct_default_conntrack_display, (void *)&cmp);
+				nfct_default_conntrack_event_display, 
+				(void *)&cmp);
 		} else {
 			nfct_register_callback(cth, 
-				nfct_default_conntrack_display, NULL);
+				nfct_default_conntrack_event_display, NULL);
 		}
 		res = nfct_event_conntrack(cth);
 		nfct_close(cth);




More information about the netfilter-cvslog mailing list