From 88d80a54ba77dd6d68d777e737b95fc2aa4d78de Mon Sep 17 00:00:00 2001 From: shin Date: Thu, 9 Mar 2000 14:47:21 +0000 Subject: Update icmp node info query message bit order of query types, according to draft-ietf-ipngwg-icmp-name-lookups-04 to 05 change. This is necessary before 4.0, because, -This change is non backword compatible -Other KAME derived platforms applied 05 -Author of the draft said he never do backword imcompatible changes again. Approved by: jkh Obtained from: KAME project --- sys/netinet6/icmp6.c | 8 +++++--- sys/netinet6/icmp6.h | 34 ++++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 17 deletions(-) (limited to 'sys/netinet6') diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 02c2219..4720296 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -915,8 +915,12 @@ ni6_addrs(ni6, m, ifpp) &ifa6->ia_addr.sin6_addr)) iffound = 1; - if (ifa6->ia6_flags & IN6_IFF_ANYCAST) + if (ifa6->ia6_flags & IN6_IFF_ANYCAST) { + if ((ni6->ni_flags & NI_NODEADDR_FLAG_ANYCAST) + != 0) + addrsofif++; continue; /* we need only unicast addresses */ + } if ((ni6->ni_flags & (NI_NODEADDR_FLAG_LINKLOCAL | NI_NODEADDR_FLAG_SITELOCAL | @@ -986,8 +990,6 @@ ni6_store_addrs(ni6, nni6, ifp0, resid) } else { /* unicast address */ if (ni6->ni_flags & NI_NODEADDR_FLAG_ANYCAST) continue; - else - docopy = 1; } /* What do we have to do about ::1? */ diff --git a/sys/netinet6/icmp6.h b/sys/netinet6/icmp6.h index feb664e..495297f 100644 --- a/sys/netinet6/icmp6.h +++ b/sys/netinet6/icmp6.h @@ -320,21 +320,27 @@ struct icmp6_nodeinfo { #if BYTE_ORDER == BIG_ENDIAN #define NI_SUPTYPE_FLAG_COMPRESS 0x1 #define NI_FQDN_FLAG_VALIDTTL 0x1 -#define NI_NODEADDR_FLAG_LINKLOCAL 0x1 -#define NI_NODEADDR_FLAG_SITELOCAL 0x2 -#define NI_NODEADDR_FLAG_GLOBAL 0x4 -#define NI_NODEADDR_FLAG_ALL 0x8 -#define NI_NODEADDR_FLAG_TRUNCATE 0x10 -#define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */ #elif BYTE_ORDER == LITTLE_ENDIAN -#define NI_SUPTYPE_FLAG_COMPRESS 0x0100 -#define NI_FQDN_FLAG_VALIDTTL 0x0100 -#define NI_NODEADDR_FLAG_LINKLOCAL 0x0100 -#define NI_NODEADDR_FLAG_SITELOCAL 0x0200 -#define NI_NODEADDR_FLAG_GLOBAL 0x0400 -#define NI_NODEADDR_FLAG_ALL 0x0800 -#define NI_NODEADDR_FLAG_TRUNCATE 0x1000 -#define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */ +#define NI_SUPTYPE_FLAG_COMPRESS 0x0100 +#define NI_FQDN_FLAG_VALIDTTL 0x0100 +#endif + +#if BYTE_ORDER == BIG_ENDIAN +#define NI_NODEADDR_FLAG_TRUNCATE 0x1 +#define NI_NODEADDR_FLAG_ALL 0x2 +#define NI_NODEADDR_FLAG_COMPAT 0x4 +#define NI_NODEADDR_FLAG_LINKLOCAL 0x8 +#define NI_NODEADDR_FLAG_SITELOCAL 0x10 +#define NI_NODEADDR_FLAG_GLOBAL 0x20 +#define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */ +#elif BYTE_ORDER == LITTLE_ENDIAN +#define NI_NODEADDR_FLAG_TRUNCATE 0x0100 +#define NI_NODEADDR_FLAG_ALL 0x0200 +#define NI_NODEADDR_FLAG_COMPAT 0x0400 +#define NI_NODEADDR_FLAG_LINKLOCAL 0x0800 +#define NI_NODEADDR_FLAG_SITELOCAL 0x1000 +#define NI_NODEADDR_FLAG_GLOBAL 0x2000 +#define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */ #endif struct ni_reply_fqdn { -- cgit v1.1