Skip to contentSkip to conversation

openvpn: Fix paths to external utilities

PATCH New Valentine Barshak 2 participants 3 messages Sep 30, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openvpn: Fix paths to external utilities

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.

---
 package/openvpn/openvpn.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
package/openvpn/openvpn.mk +5 -1
index 03eabcf..b7e13f5 100644
@@ -6,7 +6,11 @@
 
 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 \
+			--with-iproute-path=/bin/ip
 
 ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
 	OPENVPN_DEPENDENCIES += lzo
Signature · 1 line
1.7.11.4
#1 lore raw

PATCH 1/1 openvpn: Fix paths to external utilities

Quoted 16 lines · Valentine Barshak

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.

---
 package/openvpn/openvpn.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
package/openvpn/openvpn.mk +0 -0
index 03eabcf..b7e13f5 100644

package/openvpn/openvpn.mk line 13

Quoted 9 lines
package/openvpn/openvpn.mk +5 -1
@@ -6,7 +6,11 @@
 
 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 \
+			--with-iproute-path=/bin/ip

And what happens if i install let's say iproute2 which provides a nicer/bigger /sbin/ip instead of using the busybox one? Regards.

#2 lore raw

PATCH 1/1 openvpn: Fix paths to external utilities

Quoted 19 lines · Gustavo Zacarias
Quoted 17 lines · Valentine Barshak

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.

---
  package/openvpn/openvpn.mk | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
package/openvpn/openvpn.mk +0 -0
index 03eabcf..b7e13f5 100644
@@ -6,7 +6,11 @@
 
Quoted 13 lines

package/openvpn/openvpn.mk line 13

Quoted 8 lines
package/openvpn/openvpn.mk +5 -1
  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 \
+			--with-iproute-path=/bin/ip

And what happens if i install let's say iproute2 which provides a nicer/bigger /sbin/ip instead of using the busybox one? Regards.

You'll be surprised to see openvpn fail to find it :)

Unless you build on the latest fedora, which has this stuff in /usr/sbin. So you won't see any difference, because it has failed to find it before.

I'll submit new version with BR2_PACKAGE_IPROUTE2 check.

Thanks,
Val.