Blame SOURCES/001-Add-optional-dev-keyword.patch

c2a81f
From d137d6097a43687f98c642f172c48b94652ba067 Mon Sep 17 00:00:00 2001
c2a81f
From: Jan Macku <jamacku@redhat.com>
c2a81f
Date: Fri, 24 Jul 2020 13:46:14 +0200
c2a81f
Subject: [PATCH 1/2] Add optional 'dev' keyword
c2a81f
c2a81f
Fix the problem when the device name could be interpreted as an iproute2 keyword.
c2a81f
For example, for a bridge slave named "a" the iproute2 would treat
c2a81f
the name as a prefix of keyword "address" and the network-scripts
c2a81f
would fail to set the bridge master.
c2a81f
c2a81f
Resolves: rhbz #1859785
c2a81f
c2a81f
(cherry picked from commit 100ed46b483b50059b3be796bafaf7b8f2b99220)
c2a81f
---
c2a81f
 network-scripts/ifup     | 2 +-
c2a81f
 network-scripts/ifup-eth | 4 ++--
c2a81f
 2 files changed, 3 insertions(+), 3 deletions(-)
c2a81f
c2a81f
diff --git a/network-scripts/ifup b/network-scripts/ifup
c2a81f
index 69b0bd24..8d565800 100755
c2a81f
--- a/network-scripts/ifup
c2a81f
+++ b/network-scripts/ifup
c2a81f
@@ -140,7 +140,7 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ] && [ -n "$DEVICE" ]; then
c2a81f
                 exit 1
c2a81f
             }
c2a81f
 
c2a81f
-            [ -n "${VLAN_EGRESS_PRIORITY_MAP}" ] && ip link set ${DEVICE} type vlan egress ${VLAN_EGRESS_PRIORITY_MAP}
c2a81f
+            [ -n "${VLAN_EGRESS_PRIORITY_MAP}" ] && ip link set dev ${DEVICE} type vlan egress ${VLAN_EGRESS_PRIORITY_MAP}
c2a81f
         fi
c2a81f
     fi
c2a81f
 
c2a81f
diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth
c2a81f
index 1d6f18e7..cd898f63 100755
c2a81f
--- a/network-scripts/ifup-eth
c2a81f
+++ b/network-scripts/ifup-eth
c2a81f
@@ -60,7 +60,7 @@ if [ "${TYPE}" = "Bridge" ]; then
c2a81f
     if [ ! -d /sys/class/net/${DEVICE}/bridge ]; then
c2a81f
         ip link add ${DEVICE} type bridge $bridge_opts || exit 1
c2a81f
     elif [ -n "${bridge_opts}" ]; then
c2a81f
-        ip link set ${DEVICE} type bridge $bridge_opts || exit 1
c2a81f
+        ip link set dev ${DEVICE} type bridge $bridge_opts || exit 1
c2a81f
     fi
c2a81f
     unset bridge_opts
c2a81f
 
c2a81f
@@ -191,7 +191,7 @@ if [ -n "${BRIDGE}" ]; then
c2a81f
     /sbin/ip link set dev ${DEVICE} up
c2a81f
     ethtool_set
c2a81f
     [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY}
c2a81f
-    ip link set ${DEVICE} master ${BRIDGE}
c2a81f
+    ip link set dev ${DEVICE} master ${BRIDGE}
c2a81f
     # add the bits to setup driver parameters here
c2a81f
     for arg in $BRIDGING_OPTS ; do
c2a81f
         key=${arg%%=*};
c2a81f
-- 
c2a81f
2.25.4
c2a81f