summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-02-02 01:41:26 +0000
committerbrian <brian@FreeBSD.org>2001-02-02 01:41:26 +0000
commitc8af44b03bf39b7f487273a8d85c29c92a4838d0 (patch)
tree42c85d8147d82c003265b6f8d36ecac8b1ca21c8
parentfacc7916bece3c842622cc398afeacaa090ac2a8 (diff)
downloadFreeBSD-src-c8af44b03bf39b7f487273a8d85c29c92a4838d0.zip
FreeBSD-src-c8af44b03bf39b7f487273a8d85c29c92a4838d0.tar.gz
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).
-rw-r--r--usr.sbin/ppp/bundle.c2
1 files changed, 1 insertions, 1 deletions
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++) {
/*
OpenPOWER on IntegriCloud