|
|
OpenVPN 2.0beta11 compiled on NetBSD 1.5.x gives me this error when I try to
use the "route" option:
Wed Sep 1 14:50:29 2004 us=327024 OpenVPN 2.0_beta11 i386-unknown-netbsdelf1.5.2 [SSL] [LZO] built on Aug 24 2004
[...]
Wed Sep 1 14:50:29 2004 us=477686 /sbin/ifconfig tun0 10.4.0.1 10.4.0.2 mtu 1500 netmask 255.255.255.255 up
Wed Sep 1 14:50:29 2004 us=520203 Sorry, but I don't know how to do 'route' commands on this operating system. Try putting your routes in a --route-up script
Wed Sep 1 14:50:29 2004 us=520589 Exiting
Using the --route-up command worked, but it's annoying. Since the OpenBSD
and NetBSD "route" commands seem to use the same syntax, I came up with
the patch below. The patch is also enclosed in this message as an attached
file for those of you with white-space impaired mail readers.
--------------------------------------------------------
725c725
< #elif defined(TARGET_OPENBSD)
---
> #elif defined(TARGET_OPENBSD) | defined(TARGET_NETBSD)
740c740
< status = system_check (BSTR (&buf), "ERROR: OpenBSD route add command failed", false);
---
> status = system_check (BSTR (&buf), "ERROR: OpenBSD/NetBSD route add command failed", false);
837c837
< #elif defined(TARGET_OPENBSD)
---
> #elif defined(TARGET_OPENBSD) | defined(TARGET_NETBSD)
845c845
< system_check (BSTR (&buf), "ERROR: OpenBSD route delete command failed", false);
---
> system_check (BSTR (&buf), "ERROR: OpenBSD/NetBSD route delete command failed", false);
725c725
< #elif defined(TARGET_OPENBSD)
---
> #elif defined(TARGET_OPENBSD) | defined(TARGET_NETBSD)
740c740
< status = system_check (BSTR (&buf), "ERROR: OpenBSD route add command failed", false);
---
> status = system_check (BSTR (&buf), "ERROR: OpenBSD/NetBSD route add command failed", false);
837c837
< #elif defined(TARGET_OPENBSD)
---
> #elif defined(TARGET_OPENBSD) | defined(TARGET_NETBSD)
845c845
< system_check (BSTR (&buf), "ERROR: OpenBSD route delete command failed", false);
---
> system_check (BSTR (&buf), "ERROR: OpenBSD/NetBSD route delete command failed", false);
|