From 3d9c5a959cc00cf991185b7c5983de49d37c4d21 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Mon, 18 Jan 2016 10:50:59 +0100 Subject: [PATCH] Fixes docker/docker#19404 incorrect error message if custom IP if the custom IP-address is not within a subnet of the network. Signed-off-by: Vincent Demeester --- libnetwork/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetwork/endpoint.go b/libnetwork/endpoint.go index 68aba0b7ce..c1d40f0c11 100644 --- a/libnetwork/endpoint.go +++ b/libnetwork/endpoint.go @@ -913,7 +913,7 @@ func (ep *endpoint) assignAddressVersion(ipVer int, ipam ipamapi.Ipam) error { } } if progAdd != nil { - return types.BadRequestErrorf("Invalid preferred address %s: It does not belong to any of this network's subnets") + return types.BadRequestErrorf("Invalid preferred address %s: It does not belong to any of this network's subnets", prefAdd) } return fmt.Errorf("no available IPv%d addresses on this network's address pools: %s (%s)", ipVer, n.Name(), n.ID()) }