`nfErrorFunction` does string matching to determine error type
There has to be a better way than this:
func nfErrorFunction(err error) int {
// There has to be a better way to do this. Raising issue
if err.Error() == "netlink receive: i/o timeout" ||
err.Error() == "netlink receive: recvmsg: i/o timeout" {
// This appears to be normal, ignore
return 0
}
log.Info("Error received:", err)
return 0
}
This is used in RegisterWithErrorFunc - it's a little hard to test, as I don't know that our error function has ever actually been called.