Patchwork [v2] openvpn: Fix paths to external utilities

login
register
mail settings
Submitter Valentine Barshak
Date Sept. 30, 2012, 8:43 p.m.
Message ID <20120930204358.GA23699@gmail.com>
Download mbox | patch
Permalink /patch/188199/
State Accepted
Commit f02d58ccffa9be5d27dea4f13d690af1df9a96b9
Headers show

Comments

Valentine Barshak - Sept. 30, 2012, 8:43 p.m.
This sets paths to ifconfig, route, netstat and ip
in the target root filesystem.

Otherwise the paths leak from the host and may not
match those on the target.

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
---
 package/openvpn/openvpn.mk | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Peter Korsgaard - Oct. 8, 2012, 7:56 p.m.
>>>>> "Valentine" == Valentine Barshak <gvaxon@gmail.com> writes:

 Valentine> This sets paths to ifconfig, route, netstat and ip
 Valentine> in the target root filesystem.

 Valentine> Otherwise the paths leak from the host and may not
 Valentine> match those on the target.

Committed, thanks.

Patch

diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
index 03eabcf..1c6e6ec 100644
--- a/package/openvpn/openvpn.mk
+++ b/package/openvpn/openvpn.mk
@@ -6,7 +6,16 @@ 
 
 OPENVPN_VERSION = 2.2.2
 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
-OPENVPN_CONF_OPT = --enable-small --disable-plugins
+OPENVPN_CONF_OPT = --enable-small --disable-plugins \
+			--with-ifconfig-path=/sbin/ifconfig \
+			--with-route-path=/sbin/route \
+			--with-netstat-path=/bin/netstat
+
+ifeq ($(BR2_PACKAGE_IPROUTE2),y)
+OPENVPN_CONF_OPT += --with-iproute-path=/sbin/ip
+else
+OPENVPN_CONF_OPT += --with-iproute-path=/bin/ip
+endif
 
 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
 	OPENVPN_DEPENDENCIES += lzo