Opened 3 years ago

Last modified 13 months ago

#1078 assigned Bug / Defect

opensolaris fails on tun restart

Reported by: Gert Döring Owned by: Gert Döring
Priority: major Milestone: release 2.6
Component: Networking Version: OpenVPN git master branch (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: solaris, PPA, restart
Cc:

Description

Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] PUSH: Received control message: 'PUSH_REPLY,route 10.7.38.0 255.255.255.0,route 10.7.39.0 255.255.255.0,route 10.177.36.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.177.36.6 10.177.36.5'
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] OPTIONS IMPORT: timers and/or timeouts modified
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] OPTIONS IMPORT: --ifconfig/up options modified
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] OPTIONS IMPORT: route options modified
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] ROUTE: default_gateway=UNDEF
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.error] Can't set PPA 0: File exists (errno=17)
Jul 12 10:13:05 osol10 openvpn[2435]: [ID 583609 daemon.notice] Exiting due to fatal error

with this config file

client
dev tun
proto udp
remote $host 1194
resolv-retry infinite
nobind
ping 10
ping-restart 300
persist-key

Change History (5)

comment:1 Changed 3 years ago by Gert Döring

ugh, maybe this was fixed long ago and I just should upgrade this machine...

Jul 12 10:19:05 osol10 openvpn[14660]: [ID 583609 daemon.notice] OpenVPN 2.3_master i386-pc-solaris2.11 [SSL (OpenSSL)] [LZO] [eurephia] [PF_INET6] [IPv6 payload 20110522-1 (2.2.0)] built on Jun 2 2012

... trying again with git master as of today.

comment:2 Changed 3 years ago by Gert Döring

Jul 12 10:23:50 osol10 openvpn[23348]: [ID 583609 daemon.notice] OpenVPN 2.PRODUCT_VERSION_MINORPRODUCT_VERSION_PATCH [git:master/b7bea782f3356dbd+] i386-pc-solaris2.11 [SSL (OpenSSL)] [LZO] [LZ4] [MH/PKTINFO] [AEAD] built on Jul 12 2018

... some day I should teach our build system that Solaris /bin/sh is crap, and it needs to use "something else" to get files built...

comment:3 Changed 3 years ago by Gert Döring

still broken

Jul 12 10:31:04 osol10 openvpn[23349]: [ID 583609 daemon.error] Can't set PPA 0: File exists (errno=17)

comment:4 Changed 13 months ago by Gert Döring

I've looked into this a bit more today, and can't really figure out what we are doing wrong.

It's not as simple as "just ignore errno == EEXIST and go on" - there's multiple EEXIST's, and then it fails with

2020-09-11 17:51:18 TUN/TAP device tap0 opened
2020-09-11 17:51:18 /usr/sbin/ifconfig tap0 10.204.9.2 netmask 255.255.255.0 up
ifconfig: could not create address:Interface does not exist
2020-09-11 17:51:18 Solaris ifconfig phase-2 failed: external program exited with error status: 1

so I stare at the code, and I see we do lots of (STREAMS?) module pushing and popping, and on cleanup (solaris_close_tun()) we seem to clean up things as well - but obviously not "enough".

When OpenVPN does a hard restart ("program exit, new program") everything works, so we're not leaving around persistent interfaces - but something is still "stuck".

comment:5 Changed 13 months ago by Gert Döring

Milestone: release 2.5release 2.6
Note: See TracTickets for help on using tickets.