diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2007-05-03 21:03:47 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2007-05-03 21:03:47 +0000 |
commit | 8fed749006b495cc65ae4d7a7d52990cd7333b4b (patch) | |
tree | 939c0331ea5d6c43ccfc07bc317ba4c19d0ee130 /sys/net/if_tun.c | |
parent | c3973be796a91a91dd197a32b44a2ac6e32901a4 (diff) |
Use if_flags instead of ifr_flags.
It shouldn't make a difference, but some
ioctl-callers don't initialize the ifreq properly.
Fixes a panic w/ tun(4) on trunk(4).
OK reyk@, claudio@
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 09e3cc4bd2d..ea97ecc895a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.85 2007/02/21 13:24:55 claudio Exp $ */ +/* $OpenBSD: if_tun.c,v 1.86 2007/05/03 21:03:46 mpf Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -520,7 +520,7 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCSIFFLAGS: error = tun_switch(tp, - ifr->ifr_flags & IFF_LINK0 ? TUN_LAYER2 : 0); + ifp->if_flags & IFF_LINK0 ? TUN_LAYER2 : 0); break; default: error = EINVAL; |