Revert "add error handling to dynamic network configuration"

This commit is contained in:
Christian Goll
2023-09-07 12:09:23 +02:00
committed by GitHub
parent 7dc2061b20
commit bb0c37763b
3 changed files with 1 additions and 6 deletions

View File

@@ -119,10 +119,7 @@ func (conf *RootConf) SetDynamicDefaults() (err error) {
if conf.Ipaddr == "" {
wwlog.Verbose("Configuration has no valid network, going to dynamic values")
conn, err := net.Dial("udp", "8.8.8.8:80")
if err != nil {
return errors.Wrap(err, "Couldn't establish a connection to remote")
}
conn, _ := net.Dial("udp", "8.8.8.8:80")
defer conn.Close()
ipaddr = conn.LocalAddr().(*net.UDPAddr).IP
mask = ipaddr.DefaultMask()