[Openswan dev] fix for openswan-1 cvs

Tuomo Soini tis at foobar.fi
Mon Mar 1 20:18:00 CET 2004


-- 
Tuomo Soini <tis at foobar.fi>
Linux and network services
+358 40 5240030
Foobar Oy <http://foobar.fi/>

-------------- next part --------------
--- pluto/ipsec_doi.c.orig	2004-03-01 20:11:59.000000000 +0200
+++ pluto/ipsec_doi.c	2004-03-01 20:11:21.000000000 +0200
@@ -12,7 +12,7 @@
  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  * for more details.
  *
- * RCSID $Id: ipsec_doi.c,v 1.61 2004/03/01 12:52:10 paul Exp $
+ * RCSID $Id: ipsec_doi.c,v 1.60 2003/11/28 17:44:22 mcr Exp $
  */
 
 #include <stdio.h>
@@ -4789,18 +4789,6 @@
 	    p->that.client = *his_net;
 	    p->that.has_client_wildcard = FALSE;
 	}
-       /* fill in the client's true port */
-       if (p->that.has_port_wildcard)
-       {
-           int port = htons(his->port);
-
-           setportof(port, &p->that.host_addr);
-           setportof(port, &p->that.client.addr);
-
-           p->that.port = his->port;
-           p->that.has_port_wildcard = FALSE;
-       }
-
 #ifdef VIRTUAL_IP
 	else if (is_virtual_connection(c))
 	{
@@ -4810,6 +4798,17 @@
 		c->that.has_client = FALSE;
 	}
 #endif
+	/* fill in the client's true port */
+	if (c->that.has_port_wildcard)
+	{
+	    int port = htons(his->port);
+
+	    setportof(port, &c->that.host_addr);
+	    setportof(port, &c->that.client.addr);
+
+	    c->that.port = his->port;
+	    c->that.has_port_wildcard = FALSE;
+	}
     }
 
     /* now that we are sure of our connection, create our new state */



More information about the Dev mailing list