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
This commit is contained in:
William Hubbs 2011-12-09 20:49:26 -06:00
parent 325a7bf206
commit a1c655949f

View File

@ -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 "$@"