michael@666: Index: tun.c michael@668: diff -Nau tun.c.orig tun.c michael@666: --- tun.c.orig 2011-04-06 18:05:52.000000000 +0200 michael@666: +++ tun.c 2011-04-30 10:22:38.000000000 +0200 michael@668: @@ -1391,7 +1391,8 @@ michael@666: #elif defined(TARGET_SOLARIS) michael@666: michael@666: #ifndef TUNNEWPPA michael@666: -#error I need the symbol TUNNEWPPA from net/if_tun.h michael@666: +#warning I usually need the symbol TUNNEWPPA from net/if_tun.h -- using a shameless local copy taken from TUN 1.1 michael@666: +#define TUNNEWPPA (('T'<<16) | 0x0001) michael@666: #endif michael@666: michael@666: void michael@668: michael@668: ----------------------------------------------------------------------- michael@668: michael@668: It's a hack since unnumbered device drivers could contain digits in michael@668: their name, but at least this corrects OpenVPN's false assumption that michael@668: all TUN drivers in the world are named 'tun' by module and device node. michael@668: In the worst case, this change attempts to attach to a unnumbered device michael@668: node without appending a number which should fail. michael@668: michael@668: - MSvB 2012 michael@668: michael@668: Index: tun.c michael@668: diff -Nau tun.c.orig tun.c michael@668: --- tun.c.orig Fri Mar 2 19:28:20 2012 michael@668: +++ tun.c Fri Mar 2 21:08:22 2012 michael@668: @@ -1480,7 +1480,10 @@ michael@668: tt->actual_name = (char *) malloc (32); michael@668: check_malloc_return (tt->actual_name); michael@668: michael@668: - openvpn_snprintf (tt->actual_name, 32, "%s%d", dev_tuntap_type, ppa); michael@668: + if (has_digit((unsigned char *)dev)) michael@668: + openvpn_snprintf (tt->actual_name, 32, "%s", dev); michael@668: + else michael@668: + openvpn_snprintf (tt->actual_name, 32, "%s%d", dev, ppa); michael@668: michael@668: if (tt->type == DEV_TYPE_TAP) michael@668: { michael@668: Index: error.c michael@668: diff -Nau error.c.orig error.c michael@668: --- error.c.orig 2011-12-13 17:58:56.000000000 +0100 michael@668: +++ error.c 2012-03-06 18:52:39.236992377 +0100 michael@668: @@ -656,6 +656,13 @@ michael@668: void plugin_abort (void); michael@668: #endif michael@668: michael@668: + /* Ignored BUG https://community.openvpn.net/openvpn/ticket/53 michael@668: + * This solves the problem of flawed release of important resources michael@668: + * when OpenVPN daemonizes. Otherwise we see immediately after startup: michael@668: + * Tue Mar 6 18:33:22 2012 Initialization Sequence Completed michael@668: + * Tue Mar 6 18:33:36 2012 event_wait : Interrupted system call michael@668: + * Tue Mar 6 18:33:36 2012 TCP/UDP: Closing socket */ michael@668: + if (status == OPENVPN_EXIT_STATUS_ERROR) michael@668: tun_abort(); michael@668: michael@668: #ifdef WIN32 michael@668: @@ -665,6 +672,7 @@ michael@668: close_syslog (); michael@668: michael@668: #ifdef ENABLE_PLUGIN michael@668: + if (status == OPENVPN_EXIT_STATUS_ERROR) michael@668: plugin_abort (); michael@668: #endif michael@668: