]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix byte order conversion bug on echo port
authorwessels <>
Thu, 28 Mar 1996 03:20:06 +0000 (03:20 +0000)
committerwessels <>
Thu, 28 Mar 1996 03:20:06 +0000 (03:20 +0000)
src/neighbors.cc

index aadc636a02545622eb37eb918d54c6b2c23af55d..e7f93eda73b62c09e408c3baa6483d15bdb0d519 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: neighbors.cc,v 1.5 1996/03/27 18:15:50 wessels Exp $ */
+/* $Id: neighbors.cc,v 1.6 1996/03/27 20:20:06 wessels Exp $ */
 
 #include "squid.h"
 
@@ -341,7 +341,7 @@ void neighbors_open(fd)
            echo_hdr.shostid = our_socket_name.sin_addr.s_addr;
 
            sep = getservbyname("echo", "udp");
-           echo_port = sep ? sep->s_port : 7;
+           echo_port = ntohs((u_short) (sep ? sep->s_port : 7));
        }
     }
 }