summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/tun.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-03-08 10:33:30 +0000
committerbrian <brian@FreeBSD.org>2001-03-08 10:33:30 +0000
commitde377725beb0584059e8dcb91005ac76d4585772 (patch)
tree25363680722911ea6451d0c2ca98b8df45299bb1 /usr.sbin/ppp/tun.c
parentb8d51152532e9dfa4cf67ad2e643c906cd2264fd (diff)
downloadFreeBSD-src-de377725beb0584059e8dcb91005ac76d4585772.zip
FreeBSD-src-de377725beb0584059e8dcb91005ac76d4585772.tar.gz
TUNSIFINFO now requires uid 0 to change the interface MTU.
Reviewed by: Mark Knight <markk@knigma.org>
Diffstat (limited to 'usr.sbin/ppp/tun.c')
-rw-r--r--usr.sbin/ppp/tun.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c
index d391f49..f61f1f2 100644
--- a/usr.sbin/ppp/tun.c
+++ b/usr.sbin/ppp/tun.c
@@ -43,15 +43,16 @@
#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <sys/ioctl.h>
#endif
+#include <stdio.h>
#include <termios.h>
#ifdef __NetBSD__
-#include <stdio.h>
#include <unistd.h>
#endif
#include "layer.h"
#include "mbuf.h"
#include "log.h"
+#include "id.h"
#include "timer.h"
#include "lqr.h"
#include "hdlc.h"
@@ -105,7 +106,7 @@ tun_configure(struct bundle *bundle)
#ifdef __OpenBSD__
info.flags = IFF_UP|IFF_POINTOPOINT;
#endif
- if (ioctl(bundle->dev.fd, TUNSIFINFO, &info) < 0)
+ if (ID0ioctl(bundle->dev.fd, TUNSIFINFO, &info) < 0)
log_Printf(LogERROR, "tun_configure: ioctl(TUNSIFINFO): %s\n",
strerror(errno));
#endif
OpenPOWER on IntegriCloud