svn commit: r235953 - head/sys/netinet6
Bjoern A. Zeeb
bz at FreeBSD.org
Fri May 25 01:42:49 UTC 2012
Author: bz
Date: Fri May 25 01:42:48 2012
New Revision: 235953
URL: http://svn.freebsd.org/changeset/base/235953
Log:
MFp4 bz_ipv6_fast:
No need to hold the (expensive) rt lock over (expensive) logging.
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
Reviewed by: gnn (as part of the whole)
MFC After: 3 days
Modified:
head/sys/netinet6/icmp6.c
Modified: head/sys/netinet6/icmp6.c
==============================================================================
--- head/sys/netinet6/icmp6.c Fri May 25 01:21:17 2012 (r235952)
+++ head/sys/netinet6/icmp6.c Fri May 25 01:42:48 2012 (r235953)
@@ -2418,23 +2418,23 @@ icmp6_redirect_input(struct mbuf *m, int
if (rt) {
if (rt->rt_gateway == NULL ||
rt->rt_gateway->sa_family != AF_INET6) {
+ RTFREE_LOCKED(rt);
nd6log((LOG_ERR,
"ICMP6 redirect rejected; no route "
"with inet6 gateway found for redirect dst: %s\n",
icmp6_redirect_diag(&src6, &reddst6, &redtgt6)));
- RTFREE_LOCKED(rt);
goto bad;
}
gw6 = &(((struct sockaddr_in6 *)rt->rt_gateway)->sin6_addr);
if (bcmp(&src6, gw6, sizeof(struct in6_addr)) != 0) {
+ RTFREE_LOCKED(rt);
nd6log((LOG_ERR,
"ICMP6 redirect rejected; "
"not equal to gw-for-src=%s (must be same): "
"%s\n",
ip6_sprintf(ip6buf, gw6),
icmp6_redirect_diag(&src6, &reddst6, &redtgt6)));
- RTFREE_LOCKED(rt);
goto bad;
}
} else {
More information about the svn-src-all
mailing list