svn commit: r258414 - user/ae/inet6/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Thu Nov 21 02:45:08 UTC 2013
Author: ae
Date: Thu Nov 21 02:45:07 2013
New Revision: 258414
URL: http://svnweb.freebsd.org/changeset/base/258414
Log:
Use sa6_checkzone_ifp() function. Since we always know ifp, we can
use it to initialize sin6_scope_id if user didn't done this.
Modified:
user/ae/inet6/sys/netinet6/in6.c
Modified: user/ae/inet6/sys/netinet6/in6.c
==============================================================================
--- user/ae/inet6/sys/netinet6/in6.c Thu Nov 21 02:42:22 2013 (r258413)
+++ user/ae/inet6/sys/netinet6/in6.c Thu Nov 21 02:45:07 2013 (r258414)
@@ -433,10 +433,7 @@ in6_control(struct socket *so, u_long cm
break;
}
if (sa6 && sa6->sin6_family == AF_INET6) {
- if (sa6->sin6_scope_id == 0)
- sa6->sin6_scope_id = in6_getscopezone(ifp,
- in6_addrscope(&sa6->sin6_addr));
- error = sa6_checkzone(sa6);
+ error = sa6_checkzone_ifp(ifp, sa6);
if (error != 0)
return (error);
if (td != NULL && (error = prison_check_ip6(td->td_ucred,
More information about the svn-src-user
mailing list