From f50fd7a0a9b53ba475d85670a5428876e13dac36 Mon Sep 17 00:00:00 2001 From: Scott Little 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