patch-2.4.14 linux/net/ipv4/ip_sockglue.c

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

diff -u --recursive --new-file v2.4.13/linux/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
@@ -5,7 +5,7 @@
  *
  *		The IP to API glue.
  *		
- * Version:	$Id: ip_sockglue.c,v 1.60 2001/09/18 22:29:09 davem Exp $
+ * Version:	$Id: ip_sockglue.c,v 1.61 2001/10/20 00:00:11 davem Exp $
  *
  * Authors:	see ip.c
  *
@@ -474,16 +474,10 @@
 				sk->protinfo.af_inet.cmsg_flags &= ~IP_CMSG_RETOPTS;
 			break;
 		case IP_TOS:	/* This sets both TOS and Precedence */
-			  /* Reject setting of unused bits */
-#ifndef CONFIG_INET_ECN
-			if (val & ~(IPTOS_TOS_MASK|IPTOS_PREC_MASK))
-				goto e_inval;
-#else
 			if (sk->type == SOCK_STREAM) {
 				val &= ~3;
 				val |= sk->protinfo.af_inet.tos & 3;
 			}
-#endif
 			if (IPTOS_PREC(val) >= IPTOS_PREC_CRITIC_ECP && 
 			    !capable(CAP_NET_ADMIN)) {
 				err = -EPERM;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)