From 19fd1c37fbd4b20af7fd5acc537d8580483299ba Mon Sep 17 00:00:00 2001 From: Frank Yang Date: Thu, 3 Aug 2017 18:33:23 +0800 Subject: [PATCH] Fixes bug which makes restoring endpoint mess Signed-off-by: Frank Yang --- libnetwork/endpoint_info.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index 17e93b9765..47bff432cb 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -413,7 +413,7 @@ func (epj *endpointJoinInfo) UnmarshalJSON(b []byte) error { return err } if v, ok := epMap["gw"]; ok { - epj.gw6 = net.ParseIP(v.(string)) + epj.gw = net.ParseIP(v.(string)) } if v, ok := epMap["gw6"]; ok { epj.gw6 = net.ParseIP(v.(string)) @@ -442,6 +442,6 @@ func (epj *endpointJoinInfo) CopyTo(dstEpj *endpointJoinInfo) error { dstEpj.driverTableEntries = make([]*tableEntry, len(epj.driverTableEntries)) copy(dstEpj.driverTableEntries, epj.driverTableEntries) dstEpj.gw = types.GetIPCopy(epj.gw) - dstEpj.gw = types.GetIPCopy(epj.gw6) + dstEpj.gw6 = types.GetIPCopy(epj.gw6) return nil }