svn commit: r258729 - user/ae/inet6/sys/net
Andrey V. Elsukov
ae at FreeBSD.org
Fri Nov 29 04:18:37 UTC 2013
Author: ae
Date: Fri Nov 29 04:18:36 2013
New Revision: 258729
URL: http://svnweb.freebsd.org/changeset/base/258729
Log:
Some software use embedded form of zone ids.
Remove ids from the address and initialize sin6_scope_id.
Use sa6_recoverscope function for this.
Modified:
user/ae/inet6/sys/net/rtsock.c
Modified: user/ae/inet6/sys/net/rtsock.c
==============================================================================
--- user/ae/inet6/sys/net/rtsock.c Fri Nov 29 04:09:25 2013 (r258728)
+++ user/ae/inet6/sys/net/rtsock.c Fri Nov 29 04:18:36 2013 (r258729)
@@ -1036,6 +1036,15 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, str
return (0); /* should be EINVAL but for compat */
}
/* accept it */
+#ifdef INET6
+ /*
+ * XXX: some software use embedded scope ids.
+ * We remove id from address and initialize sin6_scope_id
+ * instead.
+ */
+ if (sa->sa_family == AF_INET6)
+ sa6_recoverscope((struct sockaddr_in6 *)sa);
+#endif
rtinfo->rti_info[i] = sa;
cp += SA_SIZE(sa);
}
More information about the svn-src-user
mailing list