Opened 14 years ago
Closed 11 years ago
#53 closed Bug / Defect (worksforme)
tun device was closed when starting daemon
Reported by: | shakemid | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Generic / unclassified | Version: | OpenVPN 2.1.2 / 2.1.3 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | tun opensolaris |
Cc: |
Description
I used 2.0.9 on OpenSolaris? 2009.06. It worked well. But, 2.1.3 did not work well.
The configuration is the following.
openvpn --daemon --config server.conf
--
dev tun
proto udp
server 10.8.0.0 255.255.255.0
client-to-client
push "redirect-gateway def1"
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
comp-lzo
persist-key
persist-tun
keepalive 10 120
ifconfig-pool-persist ipp.txt
status openvpn-status.log
log-append /var/log/openvpn/openvpn.log
--
With daemon mode, tun device have been closed and routing have been deleted at once at starting. And, clients can connect, but can't send/receive packets. Output logs are the following.
--
Tue Sep 7 23:01:36 2010 TUN/TAP device tun0 opened
Tue Sep 7 23:01:36 2010 /usr/sbin/ifconfig tun0 10.8.0.1 10.8.0.2 mtu 1500 up
Tue Sep 7 23:01:36 2010 /usr/sbin/ifconfig tun0 netmask 255.255.255.255
add net 10.8.0.0: gateway 10.8.0.2
Tue Sep 7 23:01:36 2010 UDPv4 link local (bound): [undef]:1194
Tue Sep 7 23:01:36 2010 UDPv4 link remote: [undef]
Tue Sep 7 23:01:36 2010 Initialization Sequence Completed
delete net 10.8.0.0: gateway 10.8.0.2
--
I found openvpn_exit() is called after fork in misc.c. And, tun_abort() is called in openvpn_exit function, thus tun device is closed.
I modified error.c as follows.
$ diff error.c.orig error.c
698c698,699
< tun_abort();
---
if (status == OPENVPN_EXIT_STATUS_ERROR)
tun_abort();
After that, it seemed to work well.
Clients can connect, and can send/receive packets.
Change History (3)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Keywords: | tun opensolaris added |
---|
comment:3 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Not confirmed on any recent openvpn versions. Closing, reopen if necessary.
This bug report is very old. Can someobdy reproduce this with a recent OpenVPN/Solaris version?