aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/network.in8
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