volume/local: Break early if addr was specified

I made a mistake in the last commit - after resolving the IP from the
passed `addr` for CIFS it would still resolve the `device` part.

Apply only one name resolution

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit df43311f3d)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-01-23 17:17:53 +01:00
parent ac76925ff2
commit cb77e48229
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -134,6 +134,7 @@ func (v *localVolume) mount() error {
return errors.Wrap(err, "error resolving passed in network volume address")
}
mountOpts = strings.Replace(mountOpts, "addr="+addrValue, "addr="+ipAddr.String(), 1)
break
}
if v.opts.MountType != "cifs" {