Package: openvpn
Version: 2.1.3-2
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd

OpenVPN is mostly broken on GNU/kFreeBSD because it attempts to use /sbin/route
with FreeBSD command-line interface.  /sbin/route is a compatibility wrapper
which attempts to map some functionality but is not a complete replacement
for FreeBSD route.

As a result, route management behaves unreliably (necessary routes might not be
added, and when connection is terminated stale routes are left behind).

Solution is very simple, just use /lib/freebsd/route instead which provides
the FreeBSD route command that OpenVPN expects.

Please, could you fix this problem in Sid and in Squeeze as well?

Thanks!

-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/rules'
--- debian/rules        2011-10-22 11:34:08 +0000
+++ debian/rules        2011-10-22 11:35:49 +0000
@@ -12,6 +12,7 @@ include /usr/share/quilt/quilt.make
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
 
 CFLAGS:=-g
 
@@ -28,10 +29,17 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_
        INSTALL_PROGRAM += -s
 endif
 
+ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
+# Avoid the /sbin/route wrapper which doesn't provide FreeBSD CLI as expected
+ROUTE_PATH     := /lib/freebsd/route
+else
+ROUTE_PATH     := /sbin/route
+endif
+
 config.status: $(QUILT_STAMPFN)
        dh_testdir
        # Add here commands to configure the package.
-       ./configure --enable-pthread --enable-password-save 
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr 
--mandir=\$${prefix}/share/man --with-ifconfig-path=/sbin/ifconfig 
--with-route-path=/sbin/route CFLAGS='$(CFLAGS)'
+       ./configure --enable-pthread --enable-password-save 
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr 
--mandir=\$${prefix}/share/man --with-ifconfig-path=/sbin/ifconfig 
--with-route-path=$(ROUTE_PATH) CFLAGS='$(CFLAGS)'
 
 build: build-stamp
 

Reply via email to