aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2011-12-09 20:49:26 -0600
committerWilliam Hubbs <williamh@gentoo.org>2011-12-09 20:49:26 -0600
commita1c655949f1a44b130456bc0aceeb165dbf3bed8 (patch)
treebe7d82c95c529e6f3a4fe2075994a495c0a04b97 /net
parent325a7bf206fc1d86c614e8409255b6c82341a3dc (diff)
iproute2: set a default broadcast address if none is specified
Reported-by: Spooky Ghost <spookyghost@blueyounder.co.uk> X-Gentoo-Bug: 392593 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392593
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 91282ea6..214841e4 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -134,6 +134,9 @@ _add_address()
[ -z "$scope" ] && scope="scope host"
fi
+ # figure out the broadcast address if it is not specified
+ [ -z "$broadcast" ] && broadcast="broadcast +"
+
set -- "${address}${netmask}" $peer $broadcast $anycast $label $scope dev "${IFACE}" $valid_lft $preferred_lft $home $nodad
veinfo ip addr add "$@"
ip addr add "$@"