Browse code

- fix recently introduced bug

Andrei Pelinescu-Onciul authored on 07/09/2007 14:39:07
Showing 1 changed files
... ...
@@ -837,8 +837,8 @@ inline static int _tcpconn_add_alias_unsafe(struct tcp_connection* c, int port,
837 837
 	if (c){
838 838
 		hash=tcp_addr_hash(&c->rcv.src_ip, port, l_ip, l_port);
839 839
 		/* search the aliases for an already existing one */
840
-		for (a=tcpconn_aliases_hash[hash], nxt=a?a->next:0; a;
841
-					a=nxt, nxt=a->next){
840
+		for (a=tcpconn_aliases_hash[hash], nxt=0; a; a=nxt){
841
+			nxt=a->next;
842 842
 			if ( (a->parent->state!=S_CONN_BAD) && (port==a->port) &&
843 843
 					( (l_port==0) || (l_port==a->parent->rcv.dst_port)) &&
844 844
 					(ip_addr_cmp(&c->rcv.src_ip, &a->parent->rcv.src_ip)) &&