krolaw / dhcp4

DHCP4 library written in Go.
BSD 3-Clause "New" or "Revised" License
327 stars 95 forks source link

Secondary DNS server #51

Closed motaz closed 2 years ago

motaz commented 2 years ago

Is it possible to set another DNS server? dhcp.OptionDomainNameServer

motaz commented 2 years ago

I found a solution by using JoinIPs method, and it works, I got both DNS servers in my client network information

dnsips := make([]net.IP, 2) dnsips[0] = dnsIP dnsips[1] = dns2IP dnsJ = dhcp.JoinIPs(dnsips)

motaz commented 2 years ago

JoinIPs works fine