summaryrefslogtreecommitdiffstats
path: root/rc.inet1
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackware.com>2018-03-18 03:51:23 -0500
committerRobby Workman <rworkman@slackware.com>2018-03-18 03:51:23 -0500
commit1aeadff67ff0df3efb8d49cf8c2a29b46bf12ce5 (patch)
tree6b6652eb7f859cb999d27d78061cd9a6d02aa831 /rc.inet1
parent663453e3e0136ad9ae0a4b5c9c67c535af9b8995 (diff)
downloadslacknetsetup-1aeadff67ff0df3efb8d49cf8c2a29b46bf12ce5.tar.xz
rc.inet1: set the bcast addr and flush ip addr on shutdowncurrent-20180318
Thanks to Markus Wiesner. Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'rc.inet1')
-rw-r--r--rc.inet16
1 files changed, 4 insertions, 2 deletions
diff --git a/rc.inet1 b/rc.inet1
index 2f566ef..29bd97d 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -215,8 +215,8 @@ if_up() {
else # bring up interface using a static IP address
if [ -n "${IPADDR[$i]}" ]; then # skip unconfigured interfaces
# Set up the network card:
- echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}" | $LOGGER
- /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}
+ echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}" | $LOGGER
+ /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}
if /sbin/ip link show dev ${1} | grep -wq "state DOWN" ; then
/sbin/ip link set dev ${1} up # Bring up interface
fi
@@ -268,6 +268,8 @@ if_down() {
if [ -n "${BRNICS[$i]}" ]; then
br_close $i
fi
+ # Flush the address from the interface:
+ ip address flush dev ${1}
fi
}