diff options
author | hrs <hrs@FreeBSD.org> | 2013-05-04 19:16:26 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-05-04 19:16:26 +0000 |
commit | d9d71436d975a7ec598297c564219c530aa41138 (patch) | |
tree | aa5ae7e9839ddc5bfbdcadec3937869568f4e33f /sys/netinet6/in6.c | |
parent | bf7b6b6227253281ec4cfedd2f8c95e19532acb3 (diff) | |
download | FreeBSD-src-d9d71436d975a7ec598297c564219c530aa41138.zip FreeBSD-src-d9d71436d975a7ec598297c564219c530aa41138.tar.gz |
Use FF02:0:0:0:0:2:FF00::/104 prefix for IPv6 Node Information Group
Address. Although KAME implementation used FF02:0:0:0:0:2::/96 based on
older versions of draft-ietf-ipngwg-icmp-name-lookup, it has been changed
in RFC 4620.
The kernel always joins the /104-prefixed address, and additionally does
/96-prefixed one only when net.inet6.icmp6.nodeinfo_oldmcprefix=1.
The default value of the sysctl is 1.
ping6(8) -N flag now uses /104-prefixed one. When this flag is specified
twice, it uses /96-prefixed one instead.
Reviewed by: ume
Based on work by: Thomas Scheffler
PR: conf/174957
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet6/in6.c')
-rw-r--r-- | sys/netinet6/in6.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 934665c..5a90111 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -106,6 +106,9 @@ __FBSDID("$FreeBSD$"); #include <netinet6/scope6_var.h> #include <netinet6/in6_pcb.h> +VNET_DECLARE(int, icmp6_nodeinfo_oldmcprefix); +#define V_icmp6_nodeinfo_oldmcprefix VNET(icmp6_nodeinfo_oldmcprefix) + /* * Definitions of some costant IP6 addresses. */ @@ -947,6 +950,17 @@ in6_update_ifa_join_mc(struct ifnet *ifp, struct in6_aliasreq *ifra, else LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain); } + if (V_icmp6_nodeinfo_oldmcprefix && + in6_nigroup_oldmcprefix(ifp, NULL, -1, &mltaddr.sin6_addr) == 0) { + imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, delay); + if (imm == NULL) + nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s " + "(errno=%d)\n", __func__, ip6_sprintf(ip6buf, + &mltaddr.sin6_addr), if_name(ifp), error)); + /* XXX not very fatal, go on... */ + else + LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain); + } /* * Join interface-local all-nodes address. |