diff options
author | Roy Marples <roy@marples.name> | 2009-11-11 00:31:32 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-11-11 00:31:32 +0000 |
commit | d21177e5c786b5684365c4a323c1ec904c2e0a6e (patch) | |
tree | 4461123b0f5c1916c6e16064c3090adab081cc27 | |
parent | d29daf395299fc97b8e13676bc282800a8bddae8 (diff) |
Ensure we have a valid broadcast address.
-rw-r--r-- | init.d/network.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/init.d/network.in b/init.d/network.in index 0d45cb9b..7bbe2535 100644 --- a/init.d/network.in +++ b/init.d/network.in @@ -107,8 +107,14 @@ intup=false runip() { local int="$1" err= - shift + + # Ensure we have a valid broadcast address + case "$@" in + *" broadcast "*|*" brd "*) ;; + *) set -- "$@" brd +;; + esac + err=$(LC_ALL=C ip address add "$@" dev "$int" 2>&1) if [ -z "$err" ]; then # ip does not bring up the interface when adding addresses |