Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/netinet6/icmp6.c 166619 2007-02-10 12:25:19Z bms $ */
---
> /* $FreeBSD: head/sys/netinet6/icmp6.c 169664 2007-05-17 21:20:24Z jinmei $ */
668a669,672
> /*
> * XXX: this combination of flags is pointless,
> * but should we keep this for compatibility?
> */
1186a1191,1208
> * Validate IPv6 source address.
> * The default configuration MUST be to refuse answering queries from
> * global-scope addresses according to RFC4602.
> * Notes:
> * - it's not very clear what "refuse" means; this implementation
> * simply drops it.
> * - it's not very easy to identify global-scope (unicast) addresses
> * since there are many prefixes for them. It should be safer
> * and in practice sufficient to check "all" but loopback and
> * link-local (note that site-local unicast was deprecated and
> * ULA is defined as global scope-wise)
> */
> if ((icmp6_nodeinfo & ICMP6_NODEINFO_GLOBALOK) == 0 &&
> !IN6_IS_ADDR_LOOPBACK(&ip6->ip6_src) &&
> !IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src))
> goto bad;
>
> /*
1192c1214
< * [icmp-name-lookups-08, Section 4.]
---
> * [RFC4602, Section 5.]
1203c1225
< !(icmp6_nodeinfo & 4)) {
---
> !(icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK)) {
1318c1340
< if ((icmp6_nodeinfo & 1) == 0)
---
> if ((icmp6_nodeinfo & ICMP6_NODEINFO_FQDNOK) == 0)
1323c1345
< if ((icmp6_nodeinfo & 2) == 0)
---
> if ((icmp6_nodeinfo & ICMP6_NODEINFO_NODEADDROK) == 0)
1701c1723
< (icmp6_nodeinfo & 4) == 0) {
---
> (icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK) == 0) {
1789c1811
< (icmp6_nodeinfo & 4) == 0) {
---
> (icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK) == 0) {