1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-10 09:42:26 +00:00

Try to kldload if_tun if we get ENOENT from opening /dev/tunN -

not just if we get ENXIO.

This makes ppp work with DEVFS when if_tun isn't built into
the kernel (without needing to manually kldload it).
This commit is contained in:
Brian Somers 2001-02-02 01:41:26 +00:00
parent efd39a2f76
commit 728ef5b2b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71912

View File

@ -701,7 +701,7 @@ bundle_Create(const char *prefix, int type, int unit)
bundle.dev.fd = ID0open(bundle.dev.Name, O_RDWR);
if (bundle.dev.fd >= 0)
break;
else if (errno == ENXIO) {
else if (errno == ENXIO || errno == ENOENT) {
#if defined(__FreeBSD__) && !defined(NOKLDLOAD)
if (bundle.unit == minunit && !kldtried++) {
/*