head 1.6; access; symbols pkgsrc-2013Q2:1.6.0.8 pkgsrc-2013Q2-base:1.6 pkgsrc-2012Q4:1.6.0.6 pkgsrc-2012Q4-base:1.6 pkgsrc-2011Q4:1.6.0.4 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q2:1.6.0.2 pkgsrc-2011Q2-base:1.6 pkgsrc-2010Q1:1.5.0.30 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.28 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.26 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.5.0.24 pkgsrc-2009Q2-base:1.5 pkgsrc-2009Q1:1.5.0.22 pkgsrc-2009Q1-base:1.5 pkgsrc-2008Q4:1.5.0.20 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.18 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.16 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.14 pkgsrc-2008Q2-base:1.5 cwrapper:1.5.0.12 pkgsrc-2008Q1:1.5.0.10 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.8 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.5.0.6 pkgsrc-2007Q3-base:1.5 pkgsrc-2007Q2:1.5.0.4 pkgsrc-2007Q2-base:1.5 pkgsrc-2007Q1:1.5.0.2 pkgsrc-2007Q1-base:1.5 pkgsrc-2006Q4:1.4.0.4 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.2 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.3.0.2 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.1.1.1.0.2 pkgsrc-2006Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.6 date 2010.05.15.05.08.46; author pettai; state dead; branches; next 1.5; 1.5 date 2007.01.03.19.21.01; author rpaulo; state Exp; branches; next 1.4; 1.4 date 2006.08.15.20.54.44; author rpaulo; state Exp; branches 1.4.4.1; next 1.3; 1.3 date 2006.05.12.08.25.47; author joerg; state Exp; branches 1.3.2.1; next 1.2; 1.2 date 2006.05.02.15.36.09; author rpaulo; state Exp; branches; next 1.1; 1.1 date 2006.02.28.01.29.39; author rpaulo; state Exp; branches 1.1.1.1; next ; 1.4.4.1 date 2007.01.04.00.57.03; author salo; state Exp; branches; next ; 1.3.2.1 date 2006.08.18.13.55.46; author salo; state Exp; branches; next ; 1.1.1.1 date 2006.02.28.01.29.39; author rpaulo; state Exp; branches 1.1.1.1.2.1; next ; 1.1.1.1.2.1 date 2006.06.07.18.23.42; author ghen; state Exp; branches; next ; desc @@ 1.6 log @Removed obsolete patch @ text @$NetBSD: patch-ac,v 1.5 2007/01/03 19:21:01 rpaulo Exp $ --- misc/isatapd.conf-in.old 2007-01-03 18:38:52.000000000 +0000 +++ misc/isatapd.conf-in 2007-01-03 18:38:58.000000000 +0000 @@@@ -10,7 +10,7 @@@@ ServerAddress isatap # Name of the network tunneling interface. -InterfaceName isatap +#InterfaceName isatap # IPv4 address to bind to (default automatic) #BindAddress 192.0.2.100 @ 1.5 log @Update do version 1.0.6 as requested by pkgsrc-security (hi!). =========================================================================== STABLE RELEASE 1.0.6 : Major bug fixes # Fix support for Teredo peers behind symmetric NATs (bug from 0.9.8). This could probably be used to spoof a Teredo clients. # MacOS X compilation fix. =========================================================================== STABLE RELEASE 1.0.5 : Major bug fixes # Fix issues with timer and compiler optimizations (bug from 0.9.4). # Increase ping test hop limit: Some IPv6 native nodes could not be reached otherwise. # Increase HMAC secret size from 64 to 128 bits. # Fix filtering of packets with link-local source address (bug from 0.4.0). # Various fixes to the experimental ISATAP daemon. ============================================================================ STABLE RELEASE 1.0.4 : Major bug fix # Fix packet storm with Teredo client behind symmetric NATs. ============================================================================ STABLE RELEASE 1.0.3 : Minor feature enhancement # Work-around for compatibility with Microsoft Teredo servers. # Better detection of symmetric NATs and access network changes. # Limit spamming of syslog. ============================================================================ STABLE RELEASE 1.0.2 : Minor portability and bug fixes # Several portability and minor/impossible bug fixes (see ChangeLog). ============================================================================ STABLE RELEASE 1.0.1 : Minor portability fixes # Install configuration file samples into a dedicated directory. # Build fixes (libteredo would not link on Mac OS X). @ text @d1 1 a1 1 $NetBSD$ @ 1.4 log @Update to version 0.9.9: ============================================================================ RELEASE CANDIDATE 0.9.9 : Minor portability fixes # NetBSD 4 build fixes. ============================================================================ RELEASE CANDIDATE 0.9.8 : Major feature enhancements, major security fixes # Support interacting with Teredo clients behind symmetric NATs. # Fix multiple problems with HMAC/ping authentication of non-Teredo nodes. # Increase timestamp wrap time from 18 hours to 70 years to avoid replay attacks against authentication tokens. # Allow Router Advertisement through the ISATAP tunnel (untested). isatapd remain very experimental, particular client-side. Someone ought to make a clean kernel implementation instead. # Use HMAC instead of random nonces in Teredo clients. ============================================================================= BETA RELEASE 0.9.7 : Major security fixes # Fix infinite UDP packet forwarding loop in Teredo server (MTFL-SA 0603). ============================================================================= BETA RELEASE 0.9.6 : Major compatibility fixes # Lots of portability fixes, mostly for FreeBSD and the likes. # Removed some dead code. # Provide teredo-mire by default. # Print more helpful error message for some common BSD tunneling issues. ============================================================================= BETA RELEASE 0.9.5 : Major features enhancement, major bug fixes # Removed too brittle cone NAT support. As a side effect, miredo is much faster to startup in client mode in most cases. # Fix server-side handling of Windows Vista client solicitations. # Removed the IgnoreConeBit configure option. The cone bit is now always ignored (this was the default ever since the introduction of that option). ============================================================================= BETA RELEASE 0.9.4 : Major features enhancement # More refined system clock usage brings about 30% performance boost. ============================================================================= BETA RELEASE 0.9.3 : Major features enhancement, major bug fixes # Use dedicated thread for packets transmission and reception. Miredo should now leverage dual-process, dual-core and SMT systems. # Receive to-be-decapsulated and to-be-encapsulated packets in blocking mode; this improves performance by about 10% on Linux. # Use the POSIX monotonic clock for maintenance procedure and “exclusive” mode watch if POSIX monotonic clock and clock selection are available. # Minor optimizations to the most stressed code paths. # Suppress spurious 4-seconds delay when waiting for “symmetric” probes. # Minimalistic support for ISATAP client in ISATAPd. # Ignore invalid Router Advertisements properly. # Drop incoming multicast traffic as a precautionary measure. # Truncate PID file properly when updating it. # Fix deadlocks and spurious exits upon some signals (such as SIGCONT). # Fix deadlock when Teredo server DNS hostname resolution fails. # Handle would-be “spurious wakeups” properly. # Fix IPv4 global unicast access-list. # Fix SO_REUSEADDR socket option usage. # Use C99 restrict keyword at sensible places for compiler optimization. # Portability fixes for DragonFly BSD. # Work-around for some uClibc POSIX defines insanity. # Got rid of all C++ code. # Renamed libteredo-mire to teredo-mire for consistency. # Leverage newer autoconf macros. # Fix encoding of non-ASCII characters in manual pages. # Work-around for platforms that can't rename tunnel network interface. # Build libmiredo dynamically to reduce global code size. # Fix inclusion of non-PIC code into shared libraries. (Unstable version 0.9.3 includes all fixes from stable version 0.8.5) ============================================================================= BETA RELEASE 0.9.1 : Major features enhancement # Created and referenced a developper mailing list: . Send a mail with subject “subscribe” to to subscribe. # Added isatap, an ISATAP router based on libtun6 and miredo. After careful IETF IPR claim check, it seems ISATAP can be freely implemented anyway. # Working support for Mac OS X: - work-around overly long closefrom() replacement, - work-around tuntap for OS X spurious initialization error. - add required defines for pthread to work properly. # Added libteredo-miredo, an undocumented Teredo “test card”. # Improve miredo-checkconf semantics. # Multi-threaded libteredo, and finer grained locking. # Fix initialization in libteredo sometimes causing a crash at startup. # Fix race condition in libteredo-list unit test. # Fix _impossible_ overflow of FD_SET(). (Unstable version 0.9.1 includes all fixes from stable version 0.8.4) @ text @d3 4 a6 4 --- misc/isatapd.conf.orig 2006-08-13 13:56:57.000000000 +0100 +++ misc/isatapd.conf 2006-08-13 13:57:02.000000000 +0100 @@@@ -8,7 +8,7 @@@@ ServerAddress isatap @ 1.4.4.1 log @Pullup ticket 1974 - requested by rpaulo security update for miredo Revisions pulled up: - pkgsrc/net/miredo/Makefile 1.12 - pkgsrc/net/miredo/PLIST 1.5 - pkgsrc/net/miredo/distinfo 1.9 - pkgsrc/net/miredo/patches/patch-aa removed - pkgsrc/net/miredo/patches/patch-ab 1.6 - pkgsrc/net/miredo/patches/patch-ac 1.5 Module Name: pkgsrc Committed By: rpaulo Date: Wed Jan 3 19:21:01 UTC 2007 Modified Files: pkgsrc/net/miredo: Makefile PLIST distinfo pkgsrc/net/miredo/patches: patch-ab patch-ac Removed Files: pkgsrc/net/miredo/patches: patch-aa Log Message: Update do version 1.0.6 as requested by pkgsrc-security (hi!). =========================================================================== STABLE RELEASE 1.0.6 : Major bug fixes # Fix support for Teredo peers behind symmetric NATs (bug from 0.9.8). This could probably be used to spoof a Teredo clients. # MacOS X compilation fix. =========================================================================== STABLE RELEASE 1.0.5 : Major bug fixes # Fix issues with timer and compiler optimizations (bug from 0.9.4). # Increase ping test hop limit: Some IPv6 native nodes could not be reached otherwise. # Increase HMAC secret size from 64 to 128 bits. # Fix filtering of packets with link-local source address (bug from 0.4.0). # Various fixes to the experimental ISATAP daemon. ============================================================================ STABLE RELEASE 1.0.4 : Major bug fix # Fix packet storm with Teredo client behind symmetric NATs. ============================================================================ STABLE RELEASE 1.0.3 : Minor feature enhancement # Work-around for compatibility with Microsoft Teredo servers. # Better detection of symmetric NATs and access network changes. # Limit spamming of syslog. =========================================================================== STABLE RELEASE 1.0.2 : Minor portability and bug fixes # Several portability and minor/impossible bug fixes (see ChangeLog). =========================================================================== STABLE RELEASE 1.0.1 : Minor portability fixes # Install configuration file samples into a dedicated directory. # Build fixes (libteredo would not link on Mac OS X). @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.5 2007/01/03 19:21:01 rpaulo Exp $ d3 4 a6 4 --- misc/isatapd.conf-in.old 2007-01-03 18:38:52.000000000 +0000 +++ misc/isatapd.conf-in 2007-01-03 18:38:58.000000000 +0000 @@@@ -10,7 +10,7 @@@@ ServerAddress isatap @ 1.3 log @Fix PLIST and bump revision. Add DragonFly work arounds for pthread.h and fix net/if_var.h test as well. @ text @d3 4 a6 3 --- libtun6/tun6.c.orig 2006-05-01 12:57:31.000000000 +0000 +++ libtun6/tun6.c @@@@ -94,6 +94,8 @@@@ static const char *os_driver = "BSD"; d8 6 a13 16 # if defined (HAVE_NET_IF_TUN_H) # include // TUNSIFHEAD, TUNSLMODE +# elif defined(__DragonFly__) +# include # elif defined (__APPLE__) # define TUNSIFHEAD _IOW('t', 96, int) # endif @@@@ -213,7 +215,7 @@@@ tun6 *tun6_create (const char *req_name) * Some BSD variants or older kernel versions do not support /dev/tun, * so fallback to the old scheme. */ - for (unsigned i = 0; (fd == -1) && (errno != ENOENT); i++) + for (unsigned i = 0; (fd == -1) && (errno == ENOENT); i++) { char tundev[5 + IFNAMSIZ]; snprintf (tundev, sizeof (tundev), "/dev/tun%u", i); @ 1.3.2.1 log @Pullup ticket 1793 - requested by rpaulo security update for miredo Revisions pulled up: - pkgsrc/net/miredo/Makefile 1.9, 1.10 - pkgsrc/net/miredo/PLIST 1.4 - pkgsrc/net/miredo/distinfo 1.6, 1.7 - pkgsrc/net/miredo/patches/patch-aa 1.4, 1.5 - pkgsrc/net/miredo/patches/patch-ab 1.5 - pkgsrc/net/miredo/patches/patch-ac 1.4 - pkgsrc/net/miredo/patches/patch-ad removed - pkgsrc/net/miredo/patches/patch-ae removed Module Name: pkgsrc Committed By: rpaulo Date: Tue Aug 15 20:54:45 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile PLIST distinfo pkgsrc/net/miredo/patches: patch-aa patch-ab patch-ac Removed Files: pkgsrc/net/miredo/patches: patch-ad patch-ae Log Message: Update to version 0.9.9: ============================================================================ RELEASE CANDIDATE 0.9.9 : Minor portability fixes # NetBSD 4 build fixes. ============================================================================ RELEASE CANDIDATE 0.9.8 : Major feature enhancements, major security fixes # Support interacting with Teredo clients behind symmetric NATs. # Fix multiple problems with HMAC/ping authentication of non-Teredo nodes. # Increase timestamp wrap time from 18 hours to 70 years to avoid replay attacks against authentication tokens. # Allow Router Advertisement through the ISATAP tunnel (untested). isatapd remain very experimental, particular client-side. Someone ought to make a clean kernel implementation instead. # Use HMAC instead of random nonces in Teredo clients. ============================================================================= BETA RELEASE 0.9.7 : Major security fixes # Fix infinite UDP packet forwarding loop in Teredo server (MTFL-SA 0603). ============================================================================= BETA RELEASE 0.9.6 : Major compatibility fixes # Lots of portability fixes, mostly for FreeBSD and the likes. # Removed some dead code. # Provide teredo-mire by default. # Print more helpful error message for some common BSD tunneling issues. ============================================================================= BETA RELEASE 0.9.5 : Major features enhancement, major bug fixes # Removed too brittle cone NAT support. As a side effect, miredo is much faster to startup in client mode in most cases. # Fix server-side handling of Windows Vista client solicitations. # Removed the IgnoreConeBit configure option. The cone bit is now always ignored (this was the default ever since the introduction of that option). ============================================================================= BETA RELEASE 0.9.4 : Major features enhancement # More refined system clock usage brings about 30% performance boost. ============================================================================= BETA RELEASE 0.9.3 : Major features enhancement, major bug fixes # Use dedicated thread for packets transmission and reception. Miredo should now leverage dual-process, dual-core and SMT systems. # Receive to-be-decapsulated and to-be-encapsulated packets in blocking mode; this improves performance by about 10% on Linux. # Use the POSIX monotonic clock for maintenance procedure and exclusive mode watch if POSIX monotonic clock and clock selection are available. # Minor optimizations to the most stressed code paths. # Suppress spurious 4-seconds delay when waiting for symmetric probes. # Minimalistic support for ISATAP client in ISATAPd. # Ignore invalid Router Advertisements properly. # Drop incoming multicast traffic as a precautionary measure. # Truncate PID file properly when updating it. # Fix deadlocks and spurious exits upon some signals (such as SIGCONT). # Fix deadlock when Teredo server DNS hostname resolution fails. # Handle would-be spurious wakeups properly. # Fix IPv4 global unicast access-list. # Fix SO_REUSEADDR socket option usage. # Use C99 restrict keyword at sensible places for compiler optimization. # Portability fixes for DragonFly BSD. # Work-around for some uClibc POSIX defines insanity. # Got rid of all C++ code. # Renamed libteredo-mire to teredo-mire for consistency. # Leverage newer autoconf macros. # Fix encoding of non-ASCII characters in manual pages. # Work-around for platforms that can't rename tunnel network interface. # Build libmiredo dynamically to reduce global code size. # Fix inclusion of non-PIC code into shared libraries. (Unstable version 0.9.3 includes all fixes from stable version 0.8.5) ============================================================================= BETA RELEASE 0.9.1 : Major features enhancement # Created and referenced a developper mailing list: . Send a mail with subject subscribe to to subscribe. # Added isatap, an ISATAP router based on libtun6 and miredo. After careful IETF IPR claim check, it seems ISATAP can be freely implemented anyway. # Working support for Mac OS X: - work-around overly long closefrom() replacement, - work-around tuntap for OS X spurious initialization error. - add required defines for pthread to work properly. # Added libteredo-miredo, an undocumented Teredo test card. # Improve miredo-checkconf semantics. # Multi-threaded libteredo, and finer grained locking. # Fix initialization in libteredo sometimes causing a crash at startup. # Fix race condition in libteredo-list unit test. # Fix _impossible_ overflow of FD_SET(). (Unstable version 0.9.1 includes all fixes from stable version 0.8.4) --- Module Name: pkgsrc Committed By: salo Date: Fri Aug 18 13:45:57 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile distinfo pkgsrc/net/miredo/patches: patch-aa Log Message: Fix example configuration files installation so they aren't installed twice (extra ones in PKG_SYSCONFDIR). ok @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2006/08/15 20:54:44 rpaulo Exp $ d3 3 a5 4 --- misc/isatapd.conf.orig 2006-08-13 13:56:57.000000000 +0100 +++ misc/isatapd.conf 2006-08-13 13:57:02.000000000 +0100 @@@@ -8,7 +8,7 @@@@ ServerAddress isatap d7 16 a22 6 # Name of the network tunneling interface. -InterfaceName isatap +#InterfaceName isatap # IPv4 address to bind to (default automatic) #BindAddress 192.0.2.100 @ 1.2 log @Update to version 0.8.4. Changes include the fix for this security problem: http://www.simphalempin.com/dev/miredo/mtfl-sa-0601.shtml.en and the additon of most pkgsrc patches. @ text @d3 12 a14 3 --- libtun6/tun6.c.orig 2006-05-02 16:30:58.000000000 +0100 +++ libtun6/tun6.c 2006-05-02 16:31:08.000000000 +0100 @@@@ -213,7 +213,7 @@@@ tun6 *tun6_create (const char *req_name) @ 1.1 log @Initial revision @ text @d3 11 a13 28 --- Makefile.in 2006-02-02 21:02:15.000000000 +0000 +++ Makefile.in.new 2006-02-28 01:08:36.000000000 +0000 @@@@ -222,7 +222,7 @@@@ sbindir = @@sbindir@@ sharedstatedir = @@sharedstatedir@@ sysconfdir = @@sysconfdir@@ target_alias = @@target_alias@@ -SUBDIRS = m4 po libtun6 libteredo src misc +SUBDIRS = m4 po libtun6 libteredo src man5_MANS = doc/miredo.conf.5 doc/miredo-server.conf.5 man8_MANS = doc/miredo.8 doc/miredo-server.8 noinst_HEADERS = include/gettext.h @@@@ -722,7 +722,6 @@@@ info-am: install-data-am: install-man @@$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: @@@@ -764,7 +763,7 @@@@ uninstall-man: uninstall-man5 uninstall- distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ - install-data-hook install-exec install-exec-am install-info \ + install-exec install-exec-am install-info \ install-info-am install-man install-man5 install-man8 \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ @ 1.1.1.1 log @Miredo is an Unix daemon program which mostly implements the "Teredo: Tunneling IPv6 over UDP through NATs" Internet proposed standard (RFC 4380). It can provide either client or relay functionality. A separate program, miredo-server is also included in the package; it consists of a Teredo server. Miredo can be used to provide IPv6 connectivity to users behind NAT which do not support IPv6, and not even proto-41 forwarding. For this to work, users need to have a Teredo client running on their system. That can be Miredo itself on Linux/FreeBSD/OpenBSD/NetBSD. -- Will (maybe) only work on NetBSD-current of an hour ago. Thanks to Hubert and Amitai for help with this one. @ text @@ 1.1.1.1.2.1 log @Pullup ticket 1687 - requested by salo security update for miredo Revisions pulled up: - pkgsrc/net/miredo/Makefile 1.4, 1.5, 1.6, 1.7, 1.8 - pkgsrc/net/miredo/distinfo 1.3, 1.4, 1.5 - pkgsrc/net/miredo/PLIST 1.2, 1.3 - pkgsrc/net/miredo/patches/patch-aa 1.3 - pkgsrc/net/miredo/patches/patch-ab 1.3, 1.4 - pkgsrc/net/miredo/patches/patch-ac 1.3 - pkgsrc/net/miredo/patches/patch-ad 1.3 - pkgsrc/net/miredo/patches/patch-ae 1.3 - pkgsrc/net/miredo/patches/patch-af removed Module Name: pkgsrc Committed By: rpaulo Date: Fri Mar 31 23:21:33 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile Log Message: SunOS is not supported. PR 33157. --- Module Name: pkgsrc Committed By: rpaulo Date: Mon Apr 3 23:30:34 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile distinfo pkgsrc/net/miredo/patches: patch-ab Log Message: NetBSD needs TUNIFHEAD. --- Module Name: pkgsrc Committed By: rpaulo Date: Tue May 2 15:36:09 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile PLIST distinfo pkgsrc/net/miredo/patches: patch-aa patch-ab patch-ac Removed Files: pkgsrc/net/miredo/patches: patch-ad patch-ae patch-af Log Message: Update to version 0.8.4. Changes include the fix for this security problem: http://www.simphalempin.com/dev/miredo/mtfl-sa-0601.shtml.en and the additon of most pkgsrc patches. --- Module Name: pkgsrc Committed By: rpaulo Date: Tue May 2 15:36:44 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile Log Message: Put back NOT_FOR_PLATFORM. --- Module Name: pkgsrc Committed By: joerg Date: Fri May 12 08:25:47 UTC 2006 Modified Files: pkgsrc/net/miredo: Makefile PLIST distinfo pkgsrc/net/miredo/patches: patch-ac Added Files: pkgsrc/net/miredo/patches: patch-ad patch-ae Log Message: Fix PLIST and bump revision. Add DragonFly work arounds for pthread.h and fix net/if_var.h test as well. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 2006/05/12 08:25:47 joerg Exp $ d3 12 a14 3 --- libtun6/tun6.c.orig 2006-05-01 12:57:31.000000000 +0000 +++ libtun6/tun6.c @@@@ -94,6 +94,8 @@@@ static const char *os_driver = "BSD"; d16 15 a30 16 # if defined (HAVE_NET_IF_TUN_H) # include // TUNSIFHEAD, TUNSLMODE +# elif defined(__DragonFly__) +# include # elif defined (__APPLE__) # define TUNSIFHEAD _IOW('t', 96, int) # endif @@@@ -213,7 +215,7 @@@@ tun6 *tun6_create (const char *req_name) * Some BSD variants or older kernel versions do not support /dev/tun, * so fallback to the old scheme. */ - for (unsigned i = 0; (fd == -1) && (errno != ENOENT); i++) + for (unsigned i = 0; (fd == -1) && (errno == ENOENT); i++) { char tundev[5 + IFNAMSIZ]; snprintf (tundev, sizeof (tundev), "/dev/tun%u", i); @