integ/base/initscripts/centos/patches/support-interface-promisc.patch
Scott Little e7efbe1105 de-fuzz initscript patches
Problem:
- Centos 7.5 upgraded initscripts.
- Porting of initscripts patches did not resolve and 'fuzz' in the line
  numbers of the patches.
- If initscript is built by rpm 4.11, or default version of rpm
  until 4.14 is compiled, a fuzzy patch results in the creating
  of an .orig file.
- Packaging of initscripts failes due to the unexpected, and
  unpackaged .orig file

Solution:
  Safest solution is to de-fuzz our initscripts patches.

  A seperate investigation will bug report will address the
broader issues.

Closes-Bug: 1794611
Change-Id: I1e91a230194c0c21798b7e91b444f929b54106d6
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-09-26 16:40:18 -04:00

54 lines
1.4 KiB
Diff

From f50fd7a0a9b53ba475d85670a5428876e13dac36 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Thu, 5 Oct 2017 12:37:06 -0400
Subject: [PATCH 4/9] WRS: Patch7-support-interface-promisc.patch
---
sysconfig/network-scripts/ifdown-eth | 5 +++++
sysconfig/network-scripts/ifup-eth | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 5b75162..60f1ba2 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -181,4 +181,9 @@ if [ -n "$VLAN" ]; then
fi
fi
+# WRS: Support PROMISC
+if [ "${PROMISC}" = yes ]; then
+ ip link set dev ${DEVICE} promisc off
+fi
+
exit $retcode
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 9bcf57f..fdbbf13 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -128,6 +128,11 @@ if [ -n "${MTU}" ]; then
ip link set dev ${DEVICE} mtu ${MTU}
fi
+# WRS: Support PROMISC
+if [ "${PROMISC}" = yes ]; then
+ ip link set dev ${DEVICE} promisc on
+fi
+
# is the device wireless? If so, configure wireless device specifics
is_wireless_device ${DEVICE} && . ./ifup-wireless
@@ -147,6 +152,9 @@ if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then
}
ethtool_set
+ # WRS: Flush addresses
+ ip addr flush dev ${DEVICE}
+
exit 0
fi
--
1.9.1