libnetwork/drivers/overlay: getBridgeNamePrefix() simplify reading of resolv.conf
We only need the content here, not the checksum, so simplifying the code by just using os.ReadFile(). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0ef0dab2f7
commit
0cbe6524db
1 changed files with 2 additions and 2 deletions
|
@ -531,8 +531,8 @@ func (n *network) getBridgeNamePrefix(s *subnet) string {
|
|||
func checkOverlap(nw *net.IPNet) error {
|
||||
var nameservers []string
|
||||
|
||||
if rc, err := resolvconf.Get(); err == nil {
|
||||
nameservers = resolvconf.GetNameserversAsCIDR(rc.Content)
|
||||
if rc, err := os.ReadFile(resolvconf.Path()); err == nil {
|
||||
nameservers = resolvconf.GetNameserversAsCIDR(rc)
|
||||
}
|
||||
|
||||
if err := netutils.CheckNameserverOverlaps(nameservers, nw); err != nil {
|
||||
|
|
Loading…
Reference in a new issue