[netfilter-cvslog] r4443 - in trunk/conntrack: . extensions include

pablo at netfilter.org pablo at netfilter.org
Thu Nov 3 20:57:51 CET 2005


Author: pablo at netfilter.org
Date: 2005-11-03 20:57:50 +0100 (Thu, 03 Nov 2005)
New Revision: 4443

Modified:
   trunk/conntrack/ChangeLog
   trunk/conntrack/extensions/libct_proto_sctp.c
   trunk/conntrack/extensions/libct_proto_tcp.c
   trunk/conntrack/include/conntrack.h
Log:
See ChangeLog



Modified: trunk/conntrack/ChangeLog
===================================================================
--- trunk/conntrack/ChangeLog	2005-11-03 19:00:36 UTC (rev 4442)
+++ trunk/conntrack/ChangeLog	2005-11-03 19:57:50 UTC (rev 4443)
@@ -3,6 +3,9 @@
 	o moves conntrack tool from bin to sbin directory since this
 	application is an administration utility and it requires uid==0 or
 	CAP_NET_ADMIN
+<pablo at eurodev.net>
+	o check if --state missing when -p is passed
+	o Bumped version to 0.96
 
 2005-11-01
 <pablo at eurodev.net>

Modified: trunk/conntrack/extensions/libct_proto_sctp.c
===================================================================
--- trunk/conntrack/extensions/libct_proto_sctp.c	2005-11-03 19:00:36 UTC (rev 4442)
+++ trunk/conntrack/extensions/libct_proto_sctp.c	2005-11-03 19:57:50 UTC (rev 4443)
@@ -108,6 +108,7 @@
 					printf("doh?\n");
 					return 0;
 				}
+				*flags |= STATE;
 			}
 			break;
 	}
@@ -118,19 +119,24 @@
 		struct nfct_tuple *orig,
 		struct nfct_tuple *reply)
 {
+	int ret = 0;
+	
 	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
 	    && !(flags & (REPL_SPORT|REPL_DPORT))) {
 		reply->l4src.sctp.port = orig->l4dst.sctp.port;
 		reply->l4dst.sctp.port = orig->l4src.sctp.port;
-		return 1;
+		ret = 1;
 	} else if (!(flags & (ORIG_SPORT|ORIG_DPORT))
 	            && (flags & (REPL_SPORT|REPL_DPORT))) {
 		orig->l4src.sctp.port = reply->l4dst.sctp.port;
 		orig->l4dst.sctp.port = reply->l4src.sctp.port;
-		return 1;
+		ret = 1;
 	}
 	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
 	    && ((flags & (REPL_SPORT|REPL_DPORT))))
+		ret = 1;
+
+	if (ret & (flags & STATE))
 		return 1;
 
 	return 0;

Modified: trunk/conntrack/extensions/libct_proto_tcp.c
===================================================================
--- trunk/conntrack/extensions/libct_proto_tcp.c	2005-11-03 19:00:36 UTC (rev 4442)
+++ trunk/conntrack/extensions/libct_proto_tcp.c	2005-11-03 19:57:50 UTC (rev 4443)
@@ -131,6 +131,7 @@
 					printf("doh?\n");
 					return 0;
 				}
+				*flags |= STATE;
 			}
 			break;
 	}
@@ -141,19 +142,24 @@
 		struct nfct_tuple *orig,
 		struct nfct_tuple *reply)
 {
+	int ret = 0;
+	
 	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
 	    && !(flags & (REPL_SPORT|REPL_DPORT))) {
 		reply->l4src.tcp.port = orig->l4dst.tcp.port;
 		reply->l4dst.tcp.port = orig->l4src.tcp.port;
-		return 1;
+		ret = 1;
 	} else if (!(flags & (ORIG_SPORT|ORIG_DPORT))
 	            && (flags & (REPL_SPORT|REPL_DPORT))) {
 		orig->l4src.tcp.port = reply->l4dst.tcp.port;
 		orig->l4dst.tcp.port = reply->l4src.tcp.port;
-		return 1;
+		ret = 1;
 	}
 	if ((flags & (ORIG_SPORT|ORIG_DPORT)) 
 	    && ((flags & (REPL_SPORT|REPL_DPORT))))
+		ret = 1;
+
+	if (ret && (flags & STATE))
 		return 1;
 
 	return 0;

Modified: trunk/conntrack/include/conntrack.h
===================================================================
--- trunk/conntrack/include/conntrack.h	2005-11-03 19:00:36 UTC (rev 4442)
+++ trunk/conntrack/include/conntrack.h	2005-11-03 19:57:50 UTC (rev 4443)
@@ -6,7 +6,7 @@
 #include <libnetfilter_conntrack/libnetfilter_conntrack.h>
 
 #define PROGNAME "conntrack"
-#define CONNTRACK_VERSION "0.95"
+#define CONNTRACK_VERSION "0.96"
 
 /* FIXME: These should be independent from kernel space */
 #define IPS_ASSURED (1 << 2)




More information about the netfilter-cvslog mailing list