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

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

diff -u --recursive --new-file v1.3.98/linux/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
@@ -181,7 +181,7 @@
 		case IP_TOS:		/* This sets both TOS and Precedence */
 			if (val<0 || val>63)	/* Reject setting of unused bits */
 				return -EINVAL;
-			if ((val&3) > 4 && !suser())	/* Only root can set Prec>4 */
+			if ((val&7) > 4 && !suser())	/* Only root can set Prec>4 */
 				return -EPERM;
 			sk->ip_tos=val;
 			switch (val & 0x38) {
@@ -297,7 +297,7 @@
 				{
 					dev=rt->rt_dev;
 					route_src = rt->rt_src;
-					ATOMIC_DECR(&rt->rt_use);
+					atomic_dec(&rt->rt_use);
 					ip_rt_put(rt);
 				}
 			}
@@ -350,7 +350,7 @@
 				if((rt=ip_rt_route(mreq.imr_multiaddr.s_addr,0))!=NULL)
 			        {
 					dev=rt->rt_dev;
-					ATOMIC_DECR(&rt->rt_use);
+					atomic_dec(&rt->rt_use);
 					route_src = rt->rt_src;
 					ip_rt_put(rt);
 				}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this