[Midnightbsd-cvs] src [7528] trunk/usr.sbin/rpcbind/util.c: remove fill scope id as we have kernel support for this so the kame kludge is no longer needed.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Apr 14 08:10:31 EDT 2016
Revision: 7528
http://svnweb.midnightbsd.org/src/?rev=7528
Author: laffer1
Date: 2016-04-14 08:10:31 -0400 (Thu, 14 Apr 2016)
Log Message:
-----------
remove fill scope id as we have kernel support for this so the kame kludge is no longer needed.
Modified Paths:
--------------
trunk/usr.sbin/rpcbind/util.c
Modified: trunk/usr.sbin/rpcbind/util.c
===================================================================
--- trunk/usr.sbin/rpcbind/util.c 2016-04-14 12:08:56 UTC (rev 7527)
+++ trunk/usr.sbin/rpcbind/util.c 2016-04-14 12:10:31 UTC (rev 7528)
@@ -57,9 +57,6 @@
#endif
static int bitmaskcmp(void *, void *, void *, int);
-#ifdef INET6
-static void in6_fillscopeid(struct sockaddr_in6 *);
-#endif
/*
* For all bits set in "mask", compare the corresponding bits in
@@ -79,26 +76,6 @@
}
/*
- * Similar to code in ifconfig.c. Fill in the scope ID for link-local
- * addresses returned by getifaddrs().
- */
-#ifdef INET6
-static void
-in6_fillscopeid(struct sockaddr_in6 *sin6)
-{
- u_int16_t ifindex;
-
- if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
- ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]);
- if (sin6->sin6_scope_id == 0 && ifindex != 0) {
- sin6->sin6_scope_id = ifindex;
- *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0;
- }
- }
-}
-#endif
-
-/*
* Find a server address that can be used by `caller' to contact
* the local service specified by `serv_uaddr'. If `clnt_uaddr' is
* non-NULL, it is used instead of `caller' as a hint suggesting
@@ -202,7 +179,6 @@
* a link-local address then use the scope id to see
* which one.
*/
- in6_fillscopeid(SA2SIN6(ifsa));
if (IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(ifsa)) &&
IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(caller_sa)) &&
IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(hint_sa))) {
More information about the Midnightbsd-cvs
mailing list