Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2015 01:39:41 GMT
From:      roam@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r287685 - soc2015/roam/ng_ayiya
Message-ID:  <201506280139.t5S1df5X059540@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506280139.t5S1df5X059540>