why is "route add failure" considered not an error?
Hi,
OpenVPN history confuses me :-) - right now, I am wondering about the following:
- if we call ifconfig to set up the tun device, and that fails, we consider it a hard error (openvpn_exec_check(..., S_FATAL, ...) and terminate
- if we then proceed to set up routing, and *that* fails, we just ignore the result (we do take notice that we couldn't add a route, so we don't try to remove it later on - but we do not actually fail)
in some situations, this behaviour is causing problems...
Typical example is windows when not running the gui with admin privileges. Interface config is done by ioctl()->DHCP (which we do have access rights to...), route add silently fails, VPN is "incomplete". Another example is trac #563, which after quite a bit of discussion seems to boil down to "a previous instance of something left around a route to the /28 subnet that should have pointed to tun1, but instead it pointed to lo0, causing loops and non-working VPN"...
So, we have good reasons to *not* do it that way, but I'm missing a reason why this is so...?
Shall we change it in 2.4 to make route add failures S_FATAL?
By default? Or add an option to turn it back into a soft-fail in case someone knows what they ar doing?
(At least for the FreeBSD "TOP_SUBNET" local route, I'm definitely going to make that connected route fatal as it will totally not work otherwise)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Yo Gert,
Quoted 24 lines · Gert Doering
Hi,
OpenVPN history confuses me :-) - right now, I am wondering about the following:
- if we call ifconfig to set up the tun device, and that fails, we consider it a hard error (
openvpn_exec_check(..., S_FATAL, ...)and terminate- if we then proceed to set up routing, and *that* fails, we just ignore the result (we do take notice that we couldn't add a route, so we don't try to remove it later on - but we do not actually fail)
in some situations, this behaviour is causing problems...
Typical example is windows when not running the gui with admin privileges. Interface config is done by ioctl()->DHCP (which we do have access rights to...), route add silently fails, VPN is "incomplete". Another example is trac #563, which after quite a bit of discussion seems to boil down to "a previous instance of something left around a route to the /28 subnet that should have pointed to tun1, but instead it pointed to lo0, causing loops and non-working VPN"...
Quoted 9 lines
So, we have good reasons to *not* do it that way, but I'm missing a reason why this is so...?
Shall we change it in 2.4 to make route add failures
S_FATAL?By default? Or add an option to turn it back into a soft-fail in case someone knows what they ar doing?
I don't know what the reasoning was behind making "route failures" non-fatal, but strictly speaking the tunnel is functioning - it's just the routing that failed :)
I'd be in favour of adding YetAnotherOption to override the "route failure" behaviour - but the real solution on e.g. the Windows side is to alter the GUI to pick up any routing failures and warn the user.
As a side note: I've gotten my hands on Windows 8.1 for my laptop. I'll install win8.1 (dual boot) on it shortly, so that we can debug the routing/ipconfig issues.
cheers,
JJK
Hi,
Quoted 6 lines · Jan Just Keijser
I don't know what the reasoning was behind making "route failures" non-fatal, but strictly speaking the tunnel is functioning - it's just the routing that failed :)
I'd be in favour of adding YetAnotherOption to override the "route failure" behaviour - but the real solution on e.g. the Windows side is to alter the GUI to pick up any routing failures and warn the user.
The GUI has no say here... OpenVPN calls route.exe (or /sbin/route) and just ignores errors (logs, though) - so the GUI would have to parse the log, or we would have to add special signalling towards the management interface.
Which wouldn't help the "there is no GUI" case...
Quoted 3 lines
As a side note: I've gotten my hands on Windows 8.1 for my laptop. I'll install win8.1 (dual boot) on it shortly, so that we can debug the routing/ipconfig issues.
Well, for *this* issue, there's not much to debug - it's a conscious decision in the code to call openvpn_exec_check() with the flags set to "errors are not fatal"...
OTOH, it seems that Steffan and Heiko might have a testable interactive service soon - which would solve the permission issue on windows nicely :-) (Heiko: how does the iservice handle failure to install a route?)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Anno domini 2015 Jan Just Keijser scripsit:
Hi,
Quoted 31 lines
Quoted 22 lines
OpenVPN history confuses me :-) - right now, I am wondering about the following:
- if we call ifconfig to set up the tun device, and that fails, we consider it a hard error (
openvpn_exec_check(..., S_FATAL, ...)and terminate- if we then proceed to set up routing, and *that* fails, we just ignore the result (we do take notice that we couldn't add a route, so we don't try to remove it later on - but we do not actually fail)
in some situations, this behaviour is causing problems...
Typical example is windows when not running the gui with admin privileges. Interface config is done by ioctl()->DHCP (which we do have access rights to...), route add silently fails, VPN is "incomplete". Another example is trac #563, which after quite a bit of discussion seems to boil down to "a previous instance of something left around a route to the /28 subnet that should have pointed to tun1, but instead it pointed to lo0, causing loops and non-working VPN"...
Quoted 9 lines
So, we have good reasons to *not* do it that way, but I'm missing a reason why this is so...?
Shall we change it in 2.4 to make route add failures
S_FATAL?By default? Or add an option to turn it back into a soft-fail in case someone knows what they ar doing?
Quoted 6 lines
I don't know what the reasoning was behind making "route failures" non-fatal, but strictly speaking the tunnel is functioning - it's just the routing that failed :)
I'd be in favour of adding YetAnotherOption to override the "route failure" behaviour - but the real solution on e.g. the Windows side is to alter the GUI to pick up any routing failures and warn the user.
+1
That would probably safe or at least shorten some support cases :)
Bonus points for pointing out OpenVPN has not been started with administrative rights and that that might be the problem.
Best
Max
Signature · 3 lines
"I have to admit I've always suspected that MTBWTF would be a more useful metric of real-world performance." -- Valdis Kletnieks on NANOG
Hi,
Quoted 2 lines · Maximilian Wilhelm
Bonus points for pointing out OpenVPN has not been started with administrative rights and that that might be the problem.
Patch welcome :-) - this is somewhere on my todo list, but I'm not a windows programmer, so I never got started in actually figuring out *which* privileges are needed, and how to check whether they are present or not...
IOW: I agree that it's useful functionality and will happily merge it, but won't be able to code it any time soon.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...