diff --git a/system.go b/system.go index a323138..4750c6f 100644 --- a/system.go +++ b/system.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "net" "os" "path/filepath" "strings" @@ -272,35 +271,6 @@ func checkRings(fd int, ifname string, rxWant, txWant uint32) (checkResult, bool return res, true } -func checkNoAddrs(ifname string) checkResult { - res := checkResult{item: ifname + " unmanaged"} - ifi, err := net.InterfaceByName(ifname) - if err != nil { - res.err = err - return res - } - addrs, err := ifi.Addrs() - if err != nil { - res.err = err - return res - } - var routable []string - for _, a := range addrs { - ipn, ok := a.(*net.IPNet) - if !ok || ipn.IP.IsLinkLocalUnicast() { - continue - } - routable = append(routable, a.String()) - } - if len(routable) == 0 { - res.state = "no routable addresses" - return res - } - res.err = fmt.Errorf("has %s; NetworkManager or DHCP is configuring this interface", - strings.Join(routable, ",")) - return res -} - func withIoctlSocket(fn func(fd int) []checkResult) []checkResult { fd, err := unix.Socket(unix.AF_INET, unix.SOCK_DGRAM, 0) if err != nil { @@ -324,7 +294,6 @@ func configureSystem(ifnames []string) []checkResult { carrierWait = 10 * time.Second } out = append(out, checkCarrier(ifname, carrierWait)) - out = append(out, checkNoAddrs(ifname)) } return out })