svn commit: r357111 - stable/12/sys/net
Eugene Grosbein
eugen at FreeBSD.org
Sat Jan 25 09:12:21 UTC 2020
Author: eugen
Date: Sat Jan 25 09:12:20 2020
New Revision: 357111
URL: https://svnweb.freebsd.org/changeset/base/357111
Log:
MFC r356863: ifa_maintain_loopback_route: adjust debugging output
Correction after r333476:
- write this as LOG_DEBUG again instead of LOG_INFO;
- get back function name into the message;
- error may be ESRCH if an address is removed in process (by carp f.e.),
not only ENOENT;
- expression complexity grows, so try making it more readable.
Modified:
stable/12/sys/net/if.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/net/if.c
==============================================================================
--- stable/12/sys/net/if.c Sat Jan 25 08:57:26 2020 (r357110)
+++ stable/12/sys/net/if.c Sat Jan 25 09:12:20 2020 (r357111)
@@ -1920,10 +1920,13 @@ ifa_maintain_loopback_route(int cmd, const char *otype
error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib);
- if (error != 0 &&
- !(cmd == RTM_ADD && error == EEXIST) &&
- !(cmd == RTM_DELETE && error == ENOENT))
- if_printf(ifp, "%s failed: %d\n", otype, error);
+ if (error == 0 ||
+ (cmd == RTM_ADD && error == EEXIST) ||
+ (cmd == RTM_DELETE && (error == ENOENT || error == ESRCH)))
+ return (error);
+
+ log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n",
+ __func__, otype, if_name(ifp), error);
return (error);
}
More information about the svn-src-stable-12
mailing list