Created attachment 295427 [details, diff] Patch net/tuntap.sh to use iproute2 Currently the tuntap moduel requires either sys-apps/usermode-utils or net-misc/openvpn, however sys-apps/iproute2 can create these devices too (however this fact isn't documented very well) Syntax is "ip tuntap ${devname} name mode <tun|tap>" I created a patch to use (and prefer) iproute2 if available, and prefer it, unless "ifconfig" is set in ${MODULES}. LAtter not testest: Also note: tuntap support wasn't added until iproute2 2.6.34 (around May 2010), the oldest stable version in the tree (as of Dec 10 2011) is 2.6.29.1-r1, however the newest stable is 2.6.35-r2 which does support it. However users of older iproute2 tools can still get it to work by openvpn_opts or tunctl_opts
i wouldn't bother with MODULES checking this block needs spacing: + if [ -n "${i_opts}"-a "${use_iproute2}"="true" ] ... should be: + if [ -n "${i_opts}" -a "${use_iproute2}" = "true" ] ... this block is wrong: + elif type ip >/dev/null 2>&1 && [ use_iproute=true ]; then should be: + elif type ip >/dev/null 2>&1 && [ "${use_iproute}" = "true" ]; then
Created attachment 295449 [details, diff] Patch net/tuntap.sh to use iproute2 - round 2 This fixes the spacing problems (actually makes them moot since I've removed the MODULES checking, which greatly simplfies things)
Comment on attachment 295449 [details, diff] Patch net/tuntap.sh to use iproute2 - round 2 looks fine to me, but someone else should prob review/merge since i haven't really done any work on the network layer this file in general looks like it could do with a rework in terms of the backend code ...
I am testing this now.
Created attachment 295575 [details] openrc-tuntap.patch Salah, this is round 3 of the patch. I found some typos and added the documentation to net.example. Everything seems to work here, so let me know what you think of this version.
Looks good to me
Your patch is in commit a38a507. Thanks for the report and the patch.