Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8916e5cb6487118130934db089d8fa5 > files > 12

openswan-2.6.32-9.el5.src.rpm

diff -urNp openswan-2.6.32-cvs-patched/programs/pluto/connections.c openswan-2.6.32-current/programs/pluto/connections.c
--- openswan-2.6.32-cvs-patched/programs/pluto/connections.c	2011-03-02 10:47:39.000000000 -0500
+++ openswan-2.6.32-current/programs/pluto/connections.c	2011-05-12 14:39:09.303205962 -0400
@@ -987,11 +987,16 @@ extract_end(struct end *dst, const struc
      */
     {
 	err_t er;
+	int port;
 	
 	switch(dst->host_type) {
 	case KH_IPHOSTNAME:
 	    er = ttoaddr(dst->host_addr_name, 0, 0, &dst->host_addr);
-	    
+
+	    /*The above call wipes out the port, put it again*/
+	    port = htons(dst->port);
+	    setportof(port, &dst->host_addr);
+		
 	    if(er) {
 		loglog(RC_COMMENT, "failed to convert '%s' at load time: %s"
 		       , dst->host_addr_name, er);