patch-2.1.124 linux/net/ipv4/ipip.c
Next file: linux/net/ipv4/ipmr.c
Previous file: linux/net/ipv4/ip_sockglue.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Sun Oct 4 10:19:39 1998
- Orig file:
v2.1.123/linux/net/ipv4/ipip.c
- Orig date:
Sat Sep 5 16:46:42 1998
diff -u --recursive --new-file v2.1.123/linux/net/ipv4/ipip.c linux/net/ipv4/ipip.c
@@ -1,7 +1,7 @@
/*
* Linux NET3: IP/IP protocol decoder.
*
- * Version: $Id: ipip.c,v 1.23 1998/08/26 12:04:00 davem Exp $
+ * Version: $Id: ipip.c,v 1.24 1998/10/03 09:37:35 davem Exp $
*
* Authors:
* Sam Lantinga (slouken@cs.ucdavis.edu) 02/01/95
@@ -625,6 +625,10 @@
case SIOCADDTUNNEL:
case SIOCCHGTUNNEL:
+ err = -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ goto done;
+
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
goto done;
@@ -652,6 +656,10 @@
break;
case SIOCDELTUNNEL:
+ err = -EPERM;
+ if (!capable(CAP_NET_ADMIN))
+ goto done;
+
if (dev == &ipip_fb_tunnel_dev) {
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov