mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
Use LittleEndian for correct byte order on DNS IPs
Nameserver IP 10.11.12.13 would otherwise get written to resolv.conf as 13.12.11.10, as was happening on my client. Signed-off-by: Eduardo Kienetz <eduardo@kienetz.com>
This commit is contained in:
parent
52969bdfb0
commit
5df6be9d38
@ -143,7 +143,7 @@ func dnsNetworkManagerUp(config DNSConfig, interfaceName string) error {
|
||||
for _, ip := range config.Nameservers {
|
||||
b := ip.As16()
|
||||
if ip.Is4() {
|
||||
dnsv4 = append(dnsv4, binary.BigEndian.Uint32(b[12:]))
|
||||
dnsv4 = append(dnsv4, binary.LittleEndian.Uint32(b[12:]))
|
||||
} else {
|
||||
dnsv6 = append(dnsv6, b[:])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user