Added --ignore-iface option to netcheck and use it to ignore weave bridge route

This commit is contained in:
Bryan Boreham committed 2015-07-07 12:52:29 +01:00
1 parent 3e7c20b4ee
commit e621aca77e
3 files changed
+23 -9

No files matched your search

+2 -2
View File
@@ -860,7 +860,7 @@ ipam_cidrs() {
ALL_CIDRS="$ALL_CIDRS $CIDR"
else
# This is a plain IP address; warn if it clashes but carry on
command_exists netcheck && netcheck $1 || true
command_exists netcheck && netcheck --ignore-iface=$BRIDGE $1 || true
ALL_CIDRS="$ALL_CIDRS $1"
fi
shift 1
@@ -998,7 +998,7 @@ launch_router() {
eval "set -- $ARGS"
if [ -z "$IPRANGE_SPECIFIED" ] ; then
IPRANGE="10.32.0.0/12"
if command_exists netcheck && ! netcheck $IPRANGE ; then
if command_exists netcheck && ! netcheck --ignore-iface=$BRIDGE $IPRANGE ; then
echo "Default --ipalloc-range $IPRANGE overlaps with existing route on host." >&2
echo "Please pick another range and set it on all hosts." >&2
exit 1