pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45394: openvpn get_default_gateway() fails on NetBSD

>Number:         45394
>Category:       pkg
>Synopsis:       openvpn get_default_gateway() fails on NetBSD
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 23 06:55:00 +0000 2011
>Originator:     Alan Barrett
>Release:        NetBSD 5.99.55
Not much
System: NetBSD 5.99.55
Architecture: i386
Machine: i386

openvpn-2.2.1 built from pkgsrc contains code to find the
default gateway, but it fails on NetBSD-current, resulting in
log messages like this:

        NOTE: unable to redirect default gateway -- Cannot read current
        default gateway from system

Build and install openvpn on NetBSD-current.  Attempt to use it with a
configuration that includes constructs like this:

        --redirect-gateway def1
        --route net_gateway

The system's default IPv4 gateway is needed by both the the
--redirect-gateway option, and the net_gateway keyword used with the
--route option.

Change the code in openvpn-2.2.1/route.c to use the correct API on

There are several versions of the get_default_gateway() function
in route.c.  The culprit seems to be the one guarded by

        #elif defined(TARGET_OPENBSD) || defined(TARGET_NETBSD)

in line 1933 of route.c.

I haven't investigated in detail, but it's suspicious that openvpn uses
it's own struct definitions instead of including appropriate headers
from the system.

Home | Main Index | Thread Index | Old Index