if_tun: check device name
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 12 Dec 2023 00:13:59 +0000 (02:13 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 12 Dec 2023 04:02:11 +0000 (06:02 +0200)
commit0365e5fc905b425313a0a2d89f0d8e2566924df2
treefbc587e986cf91dd15729380b3f5fd0f75d31a97
parentd5c6b32a31ac36faea7091d55c8b8c2ee38a7d79
if_tun: check device name

to avoid panic if the name already exists, which is possible with the
interface renaming.

PR: 266999
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43001
sys/net/if_tuntap.c