patch-2.0.18 linux/net/ipv4/raw.c

Next file: linux/net/ipv4/tcp.c
Previous file: linux/net/ipv4/icmp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.17/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
@@ -236,6 +236,10 @@
 		memcpy(&sin, usin, sizeof(sin));
 		if (sin.sin_family && sin.sin_family != AF_INET) 
 			return(-EINVAL);
+		/*
+		 *	Protocol type is host ordered byte.
+		 */
+		sin.sin_port=ntohs(sin.sin_port);
 	}
 	else 
 	{

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov