socsvn commit: r287685 - soc2015/roam/ng_ayiya
roam at FreeBSD.org
roam at FreeBSD.org
Sun Jun 28 01:39:41 UTC 2015
Author: roam
Date: Sun Jun 28 01:39:40 2015
New Revision: 287685
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287685
Log:
Detect link-local addresses better.
It's not just fe80::/16, it's a bit more complicated than that.
Also, explain the reasoning behind skipping link-local addresses.
ObQuote: "Step 2: There's so much we can do"
Modified:
soc2015/roam/ng_ayiya/ng_ayiya.c
Modified: soc2015/roam/ng_ayiya/ng_ayiya.c
==============================================================================
--- soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:37 2015 (r287684)
+++ soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:40 2015 (r287685)
@@ -450,7 +450,13 @@
continue;
const struct sockaddr_in6 * const a =
(const struct sockaddr_in6 *)ifa->ifa_addr;
- if (a->sin6_addr.s6_addr16[0] == IPV6_ADDR_INT16_ULL)
+ /**
+ * Skip link-local addresses, they can't be used as
+ * AYIYA "Identity"; hope the administrator or the TIC
+ * client has set the appropriate tunnel endpoint IPv6
+ * address on the interface by now.
+ */
+ if ((htons(a->sin6_addr.s6_addr16[0]) & 0xFFC0) == 0xFE80)
continue;
const priv_p priv = NG_NODE_PRIVATE(node);
More information about the svn-soc-all
mailing list