git: if_tun: Disallow change network device type

Aaron LI aly at
Thu Jul 19 01:15:19 PDT 2018

commit 017d03c14dd62ab3eaf8e62b04a5d0abca2a559c
Author: Aaron LI <aly at>
Date:   Mon Jul 9 12:45:24 2018 +0800

    if_tun: Disallow change network device type
    Disallow ioctl(2) to change the network device type of tun(4).
    Otherwise, page faults and panics can happen when access uninitialized
    fields in the "struct ifnet" which are specific to the network device
    Obtained-from: FreeBSD (revision 326362)

Summary of changes:
 share/man/man4/tun.4 | 11 ++++++++---
 sys/net/tun/if_tun.c |  3 ++-
 sys/net/tun/if_tun.h |  2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list