Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2015 19:03:23 GMT
From:      roam@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r287737 - soc2015/roam/ng_ayiya
Message-ID:  <201506291903.t5TJ3Nte067460@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: roam
Date: Mon Jun 29 19:03:22 2015
New Revision: 287737
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287737

Log:
  Perform the link-local check in a sensible way.
  
  There's a macro for that!
  
  Pointed out by:	bz (mentor)
  Didn't read the next page of in6.h:	roam (myself)

Modified:
  soc2015/roam/ng_ayiya/ng_ayiya.c

Modified: soc2015/roam/ng_ayiya/ng_ayiya.c
==============================================================================
--- soc2015/roam/ng_ayiya/ng_ayiya.c	Mon Jun 29 19:03:19 2015	(r287736)
+++ soc2015/roam/ng_ayiya/ng_ayiya.c	Mon Jun 29 19:03:22 2015	(r287737)
@@ -456,7 +456,7 @@
 			 * client has set the appropriate tunnel endpoint IPv6
 			 * address on the interface by now.
 			 */
-			if ((htons(a->sin6_addr.s6_addr16[0]) & 0xFFC0) == 0xFE80)
+			if (IN6_IS_ADDR_LINKLOCAL(&a->sin6_addr))
 				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?201506291903.t5TJ3Nte067460>