diff options
author | Jan Macku <jamacku@redhat.com> | 2020-07-24 13:44:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 13:44:37 +0200 |
commit | 299efd663b4614f4698cf2bc9b9ba8e72df9387e (patch) | |
tree | 06cc3b1df5ce1ab29f0820f104163c0374738bdb /network-scripts/ifup-eth | |
parent | 6ca701a23c74b245f35750149a22f7d21805a8e0 (diff) | |
download | initscripts-299efd663b4614f4698cf2bc9b9ba8e72df9387e.tar initscripts-299efd663b4614f4698cf2bc9b9ba8e72df9387e.tar.gz initscripts-299efd663b4614f4698cf2bc9b9ba8e72df9387e.tar.bz2 initscripts-299efd663b4614f4698cf2bc9b9ba8e72df9387e.tar.xz initscripts-299efd663b4614f4698cf2bc9b9ba8e72df9387e.zip |
Add optional 'dev' keyword
Fix the problem when the device name could be interpreted as an iproute2 keyword.
For example, for a bridge slave named "a" the iproute2 would treat the name
as a prefix of keyword "address" and the network-scripts would fail to set
the bridge master.
Related: rhbz #1859785
Diffstat (limited to 'network-scripts/ifup-eth')
-rwxr-xr-x | network-scripts/ifup-eth | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index 178b5173..995cba16 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -60,7 +60,7 @@ if [ "${TYPE}" = "Bridge" ]; then if [ ! -d /sys/class/net/${DEVICE}/bridge ]; then ip link add ${DEVICE} type bridge $bridge_opts || exit 1 elif [ -n "${bridge_opts}" ]; then - ip link set ${DEVICE} type bridge $bridge_opts || exit 1 + ip link set dev ${DEVICE} type bridge $bridge_opts || exit 1 fi unset bridge_opts @@ -191,7 +191,7 @@ if [ -n "${BRIDGE}" ]; then /sbin/ip link set dev ${DEVICE} up ethtool_set [ -n "${LINKDELAY}" ] && /bin/sleep ${LINKDELAY} - ip link set ${DEVICE} master ${BRIDGE} + ip link set dev ${DEVICE} master ${BRIDGE} # add the bits to setup driver parameters here for arg in $BRIDGING_OPTS ; do key=${arg%%=*}; |