summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-14 18:15:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-02-14 18:15:29 +0000
commit654811ed332d15acc636cca0371ec65f09c356da (patch)
treed552d005ea779b3ccf22ed69593cb605b34ed67c /sys
parentdd7443d6c571f753f12953aa9280863884fda76e (diff)
limit writes to ifp->if_mtu not TUNMTU
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 66eb121833c..3c13a07fad9 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.14 1996/06/17 11:06:18 deraadt Exp $ */
+/* $OpenBSD: if_tun.c,v 1.15 1997/02/14 18:15:28 deraadt Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -548,7 +548,7 @@ tunwrite(dev, uio, ioflag)
ifp = &tunctl[unit].tun_if;
TUNDEBUG(("%s: tunwrite\n", ifp->if_xname));
- if (uio->uio_resid < 0 || uio->uio_resid > TUNMTU) {
+ if (uio->uio_resid < 0 || uio->uio_resid > ifp->if_mtu) {
TUNDEBUG(("%s: len=%d!\n", ifp->if_xname, uio->uio_resid));
return EMSGSIZE;
}