From c8af44b03bf39b7f487273a8d85c29c92a4838d0 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 2 Feb 2001 01:41:26 +0000 Subject: 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). --- usr.sbin/ppp/bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/ppp/bundle.c') diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 9aea891..5e808de 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -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++) { /* -- cgit v1.1