summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/netinet
diff options
context:
space:
mode:
authordd193516 <none@none>2006-05-17 16:43:08 -0700
committerdd193516 <none@none>2006-05-17 16:43:08 -0700
commitb94bb0f0e78c11b6013e1a33c11fd73901947bfc (patch)
treeaf2f1566808ba423371b1f4a361c6f041e284562 /usr/src/uts/common/netinet
parent43fb4b48d7d5ba4ce77cb215445844e34af5848b (diff)
downloadillumos-joyent-b94bb0f0e78c11b6013e1a33c11fd73901947bfc.tar.gz
6204066 Neighbor Solicitation w/ SRC=::, DST=all-nodes-multicast should be ignored during DAD
6281202 Neighbor Solicitation w/ SRC=:: and SLLA option should be ignored during DAD
Diffstat (limited to 'usr/src/uts/common/netinet')
-rw-r--r--usr/src/uts/common/netinet/in.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/usr/src/uts/common/netinet/in.h b/usr/src/uts/common/netinet/in.h
index 7bed8be4b9..f6284c4882 100644
--- a/usr/src/uts/common/netinet/in.h
+++ b/usr/src/uts/common/netinet/in.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
@@ -603,6 +603,26 @@ struct sockaddr_in6 {
#endif /* _BIG_ENDIAN */
/*
+ * The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
+ * RFC, and shouldn't be used by portable applications. It is used to see
+ * if an address is a solicited-node multicast address, which is prefixed
+ * with ff02:0:0:0:0:1:ff00::/104.
+ */
+#ifdef _BIG_ENDIAN
+#define IN6_IS_ADDR_MC_SOLICITEDNODE(addr) \
+ (((addr)->_S6_un._S6_u32[0] == 0xff020000) && \
+ ((addr)->_S6_un._S6_u32[1] == 0x00000000) && \
+ ((addr)->_S6_un._S6_u32[2] == 0x00000001) && \
+ (((addr)->_S6_un._S6_u32[3] & 0xff000000) == 0xff000000))
+#else
+#define IN6_IS_ADDR_MC_SOLICITEDNODE(addr) \
+ (((addr)->_S6_un._S6_u32[0] == 0x000002ff) && \
+ ((addr)->_S6_un._S6_u32[1] == 0x00000000) && \
+ ((addr)->_S6_un._S6_u32[2] == 0x01000000) && \
+ (((addr)->_S6_un._S6_u32[3] & 0x000000ff) == 0x000000ff))
+#endif
+
+/*
* Macros to a) test for 6to4 IPv6 address, and b) to test if two
* 6to4 addresses have the same /48 prefix, and, hence, are from the
* same 6to4 site.