From 415f48041056a020fa27cbd16bfd0be268bf693c Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Mon, 26 Dec 2011 17:21:34 -0800 Subject: net/vlan, net/macvlan: iproute2 is required for new VLAN configuration Since commit 683a21b0a in Feburary 2011, iproute2 has been required for new VLAN configuration. MACVLAN is also impossible to configure without iproute2. However we did not check if iproute2 was actually in the modules for a given interface, so it could end up hanging or giving weird errors. Check for iproute2 before usage now. X-Gentoo-Bug: 389437 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389437 Signed-off-by: Robin H. Johnson --- net/macvlan.sh | 6 ++++++ net/vlan.sh | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/net/macvlan.sh b/net/macvlan.sh index 92bcf1f..8ac75b8 100644 --- a/net/macvlan.sh +++ b/net/macvlan.sh @@ -43,6 +43,12 @@ macvlan_pre_start() [ -z "${macvlan}" ] && return 0 _check_macvlan || return 1 + + case " ${MODULES} " in + *" ifconfig "*) + eerror "sys-apps/iproute2 is required to configure MACVLANs" + return 1 ;; + esac # optional mode, default to "private" local mode= diff --git a/net/vlan.sh b/net/vlan.sh index 9cce3b9..ced5aa0 100644 --- a/net/vlan.sh +++ b/net/vlan.sh @@ -51,6 +51,14 @@ vlan_pre_start() eerror "You must convert your vconfig_ VLAN entries to vlan${N} entries." return 1 fi + local vlans= + eval vlans=\$vlans_${IFVAR} + [ -z "$vlans" ] && return 0 + case " ${MODULES} " in + *" ifconfig "*) + eerror "sys-apps/iproute2 is required to configure VLANs" + return 1 ;; + esac } vlan_post_start() -- cgit v1.2.3