From 8fa6b3024f58fe10bd4ed1b166cb409de9e0d01c Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 28 Apr 2022 23:44:37 +0800 Subject: [PATCH] fix: dhcp ifacename type --- dns/dhcp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dns/dhcp.go b/dns/dhcp.go index e0d6c7f0..a4ad70a5 100644 --- a/dns/dhcp.go +++ b/dns/dhcp.go @@ -2,6 +2,7 @@ package dns import ( "context" + "go.uber.org/atomic" "net" "net/netip" "sync" @@ -71,7 +72,7 @@ func (d *dhcpClient) resolve(ctx context.Context) (*Resolver, error) { for _, item := range dns { nameserver = append(nameserver, NameServer{ Addr: net.JoinHostPort(item.String(), "53"), - Interface: d.ifaceName, + Interface: atomic.NewString(d.ifaceName), }) }