aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysconfig.txt2
-rwxr-xr-xsysconfig/network-scripts/ifup6
-rw-r--r--sysconfig/network-scripts/network-functions14
3 files changed, 21 insertions, 1 deletions
diff --git a/sysconfig.txt b/sysconfig.txt
index 712231e2..2ff1cb83 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -377,6 +377,8 @@ Files in /etc/sysconfig/network-scripts/
Managed from /etc/sysconfig/network-scripts/ifup-ipx
ARP=yes|no (adds 'arp' flag to ifconfig, for use with the
ethertap device)
+ PROMISC=yes|no (enable or disable promiscuous mode)
+ ALLMULTI=yes|no (enable or disable all-multicast mode)
PPP/SLIP items:
PERSIST=yes|no
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 361ede87..63a89fff 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -120,7 +120,11 @@ else
eval `/bin/ipcalc --network ${IPADDR} ${NETMASK}`
fi
- ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} ${ARP:+arp} ${MTU:+mtu $MTU}
+ ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} \
+ $(toggle_value arp $ARP) \
+ $(toggle_value promisc $PROMISC) \
+ $(toggle_value allmulti $ALLMULTI)
+
# don't re-add subnet route on 2.2 kernels, but add a route
# to a non-local subnet.
# stupid hack, but it should work
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index dd566ad6..648cb95d 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -17,6 +17,20 @@ source_config ()
. $CONFIG
}
+toggle_value()
+{
+ if [ -z "$2" ]
+ then
+ echo ''
+ elif [ "$2" = "yes" -o "$2" = "YES" ] ; then
+ echo "$1"
+ elif [ "$2" = "no" -o "$2" = "NO" ] ; then
+ echo "-$1"
+ else
+ echo ''
+ fi
+}
+
do_netreport ()
{
# Notify programs that have requested notification