2030 fixed link when bridge stated

Signed-off-by: Wojciech Kosowicz <pcellix@gmail.com>
This commit is contained in:
WojtekMac 2019-08-14 15:30:38 +02:00 committed by Wojciech Kosowicz
parent f807b5ef83
commit e5131e98ed
1 changed files with 3 additions and 2 deletions

View File

@ -763,8 +763,9 @@ func parseNetworkAttachmentOpt(ep opts.NetworkAttachmentOpts) (*networktypes.End
if len(ep.Aliases) > 0 {
return nil, errors.New("network-scoped aliases are only supported for user-defined networks")
}
if len(ep.Links) > 0 {
return nil, errors.New("links are only supported for user-defined networks")
if len(ep.Links) > 0 &&
!container.NetworkMode(ep.Target).IsBridge() {
return nil, errors.New("links are only supported for user-defined networks and bridge network")
}
}