[kexec-tools] Support dump over vlan tagged bonding

Dave Young yangrr at fedoraproject.org
Thu Jul 5 09:01:02 UTC 2012


commit 469bdf2cae289b5de194609bd3a4040635a6b438
Author: Cong Wang <amwang at redhat.com>
Date:   Tue Jun 26 18:45:04 2012 +0800

    Support dump over vlan tagged bonding
    
    Update: error out vlan over bridge case
    
    This patch adds support for vlan tagged bonding,
    in theory, we could support other complex setup as well,
    in practice, this is not easy, so just support vlan
    tagged bonding, which is the one we support in RHEL6.
    
    Note, this patch depends on the dracut patch:
    http://marc.info/?l=initramfs&m=134025049228510&w=2
    
    Cc: Dave Young <dyoung at redhat.com>
    Cc: Vivek Goyal <vgoyal at redhat.com>
    Signed-off-by: Cong Wang <amwang at redhat.com>
    Acked-by: Dave Young <dyoung at redhat.com>

 dracut-module-setup.sh |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index ed8702e..2b829f0 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -81,8 +81,19 @@ kdump_setup_vlan() {
     local _netdev=$1
     local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")"
     local _netmac="$(kdump_get_mac_addr $_phydev)"
-    echo -n " ifname=$_phydev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
-    echo " vlan=$_netdev:$_phydev" >> ${initdir}/etc/cmdline.d/43vlan.conf
+
+    echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
+
+    #Just support vlan over bond, it is not easy
+    #to support all other complex setup
+    if kdump_is_bridge "$_phydev"; then
+        derror "Vlan over bridge is not supported!"
+        exit 1
+    elif kdump_is_bond "$_phydev"; then
+        kdump_setup_bond "$_phydev"
+    else
+        echo " vlan=$_netdev:$_phydev ifname=$_phydev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
+    fi
 }
 
 # Setup dracut to bringup a given network interface


More information about the scm-commits mailing list