summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2018-10-05 07:06:10 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2018-10-05 07:06:10 +0000
commitc8bd4b206a12aef6f4f2e8120b58be8b868b956b (patch)
treef383092c748790ea2a27820ba1ac154f4bd957bb
parentd58b639ae66e77cedaf30745d93e70bc1c9699c2 (diff)
Do not join node information multicast group (RFC 4620).
Benno removed code to answer ICMP queries over 4 years ago. Aham Brahmasmi (aham.brahmasmi AT gmx.com) points out that we still joined the group though. OK sthen, bluhm, kn
-rw-r--r--sys/netinet6/in6.c15
-rw-r--r--sys/netinet6/in6_ifattach.c53
-rw-r--r--sys/netinet6/in6_ifattach.h3
3 files changed, 3 insertions, 68 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index c09ab1dcd0a..da31e0e7922 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.227 2018/05/12 09:43:02 tb Exp $ */
+/* $OpenBSD: in6.c,v 1.228 2018/10/05 07:06:09 florian Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -809,19 +809,6 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
LIST_INSERT_HEAD(&ia6->ia6_memberships, imm, i6mm_chain);
/*
- * join node information group address
- */
- if (in6_nigroup(ifp, hostname, hostnamelen, &mltaddr) == 0) {
- imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error);
- if (!imm) {
- /* XXX not very fatal, go on... */
- } else {
- LIST_INSERT_HEAD(&ia6->ia6_memberships,
- imm, i6mm_chain);
- }
- }
-
- /*
* join interface-local all-nodes address.
* (ff01::1%ifN, and ff01::%ifN/32)
*/
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 2f8463e3a47..5640c8d95ec 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_ifattach.c,v 1.110 2018/08/26 22:30:00 mpi Exp $ */
+/* $OpenBSD: in6_ifattach.c,v 1.111 2018/10/05 07:06:09 florian Exp $ */
/* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */
/*
@@ -429,57 +429,6 @@ in6_ifattach_loopback(struct ifnet *ifp)
}
/*
- * compute NI group address, based on the current hostname setting.
- * see draft-ietf-ipngwg-icmp-name-lookup-* (04 and later).
- *
- * when ifp == NULL, the caller is responsible for filling scopeid.
- */
-int
-in6_nigroup(struct ifnet *ifp, const char *name, int namelen,
- struct sockaddr_in6 *sa6)
-{
- const char *p;
- u_int8_t *q;
- SHA2_CTX ctx;
- u_int8_t digest[SHA512_DIGEST_LENGTH];
- u_int8_t l;
- u_int8_t n[64]; /* a single label must not exceed 63 chars */
-
- if (!namelen || !name)
- return -1;
-
- p = name;
- while (p && *p && *p != '.' && p - name < namelen)
- p++;
- if (p - name > sizeof(n) - 1)
- return -1; /* label too long */
- l = p - name;
- strncpy((char *)n, name, l);
- n[(int)l] = '\0';
- for (q = n; *q; q++) {
- if ('A' <= *q && *q <= 'Z')
- *q = *q - 'A' + 'a';
- }
-
- /* generate 8 bytes of pseudo-random value. */
- SHA512Init(&ctx);
- SHA512Update(&ctx, &l, sizeof(l));
- SHA512Update(&ctx, n, l);
- SHA512Final(digest, &ctx);
-
- bzero(sa6, sizeof(*sa6));
- sa6->sin6_family = AF_INET6;
- sa6->sin6_len = sizeof(*sa6);
- sa6->sin6_addr.s6_addr16[0] = htons(0xff02);
- sa6->sin6_addr.s6_addr16[1] = htons(ifp->if_index);
- sa6->sin6_addr.s6_addr8[11] = 2;
- memcpy(&sa6->sin6_addr.s6_addr32[3], digest,
- sizeof(sa6->sin6_addr.s6_addr32[3]));
-
- return 0;
-}
-
-/*
* XXX multiple loopback interface needs more care. for instance,
* nodelocal address needs to be configured onto only one of them.
* XXX multiple link-local address case
diff --git a/sys/netinet6/in6_ifattach.h b/sys/netinet6/in6_ifattach.h
index 0f54b457de9..244451ad12c 100644
--- a/sys/netinet6/in6_ifattach.h
+++ b/sys/netinet6/in6_ifattach.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_ifattach.h,v 1.8 2018/02/10 05:52:08 florian Exp $ */
+/* $OpenBSD: in6_ifattach.h,v 1.9 2018/10/05 07:06:09 florian Exp $ */
/* $KAME: in6_ifattach.h,v 1.9 2000/04/12 05:35:48 itojun Exp $ */
/*
@@ -36,7 +36,6 @@
#ifdef _KERNEL
int in6_ifattach(struct ifnet *);
void in6_ifdetach(struct ifnet *);
-int in6_nigroup(struct ifnet *, const char *, int, struct sockaddr_in6 *);
int in6_ifattach_linklocal(struct ifnet *, struct in6_addr *);
void in6_soiiupdate(struct ifnet *);
#endif /* _KERNEL */