summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-08-12 15:27:25 +0000
committerume <ume@FreeBSD.org>2005-08-12 15:27:25 +0000
commitfe6f4a34b35c56aa223badc3a9cfd6d7cd47b1ef (patch)
tree60d886cffab2850cd30d4925095be2ef3a2933f1 /sys/netinet6
parent387b90c32217bda41ca0a7a448036f5841161849 (diff)
downloadFreeBSD-src-fe6f4a34b35c56aa223badc3a9cfd6d7cd47b1ef.zip
FreeBSD-src-fe6f4a34b35c56aa223badc3a9cfd6d7cd47b1ef.tar.gz
- fix typo in comment.
- nuke unused code. Submitted by: suz Obtained from: KAME
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c6
-rw-r--r--sys/netinet6/in6_src.c2
-rw-r--r--sys/netinet6/in6_var.h2
-rw-r--r--sys/netinet6/nd6.c4
-rw-r--r--sys/netinet6/nd6_nbr.c47
-rw-r--r--sys/netinet6/nd6_rtr.c4
6 files changed, 20 insertions, 45 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 7c177c4..cb7d313 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -373,7 +373,7 @@ icmp6_error(m, type, code, param)
/*
* icmp6_reflect() is designed to be in the input path.
- * icmp6_error() can be called from both input and outut path,
+ * icmp6_error() can be called from both input and output path,
* and if we are in output path rcvif could contain bogus value.
* clear m->m_pkthdr.rcvif for safety, we should have enough scope
* information in ip header (nip6).
@@ -387,7 +387,7 @@ icmp6_error(m, type, code, param)
freeit:
/*
- * If we can't tell wheter or not we can generate ICMP6, free it.
+ * If we can't tell whether or not we can generate ICMP6, free it.
*/
m_freem(m);
}
@@ -448,7 +448,7 @@ icmp6_input(mp, offp, proto)
if (faithprefix_p != NULL && (*faithprefix_p)(&ip6->ip6_dst)) {
/*
* Deliver very specific ICMP6 type only.
- * This is important to deilver TOOBIG. Otherwise PMTUD
+ * This is important to deliver TOOBIG. Otherwise PMTUD
* will not work.
*/
switch (icmp6->icmp6_type) {
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 9d429d3..0f522b3 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -461,7 +461,7 @@ selectroute(dstsock, opts, mopts, ro, retifp, retrt, clone, norouteok)
(norouteok || retrt == NULL ||
IN6_IS_ADDR_MULTICAST(dst))) {
/*
- * we do not have to check nor get the route for
+ * we do not have to check or get the route for
* multicast.
*/
goto done;
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index f9431f8..34f52fd 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -534,7 +534,7 @@ struct in6_multistep {
/*
* Macros for looking up the in6_multi record for a given IP6 multicast
* address on a given interface. If no matching record is found, "in6m"
- * returns NLL.
+ * returns NULL.
*/
#define IN6_LOOKUP_MULTI(addr, ifp, in6m) \
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 4265b31..fbc53cc 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1036,7 +1036,7 @@ nd6_free(rt)
/*
* Upper-layer reachability hint for Neighbor Unreachability Detection.
*
- * XXX cost-effective metods?
+ * XXX cost-effective methods?
*/
void
nd6_nud_hint(rt, dst6, force)
@@ -1822,7 +1822,7 @@ nd6_output(ifp, origifp, m0, dst, rt0)
goto sendpkt;
/*
- * next hop determination. This routine is derived from ether_outpout.
+ * next hop determination. This routine is derived from ether_output.
*/
again:
if (rt) {
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 4af0f1a..db6cde4 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -87,7 +87,7 @@ static int dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */
* Input a Neighbor Solicitation Message.
*
* Based on RFC 2461
- * Based on RFC 2462 (duplicated address detection)
+ * Based on RFC 2462 (duplicate address detection)
*/
void
nd6_ns_input(m, off, icmp6len)
@@ -133,7 +133,7 @@ nd6_ns_input(m, off, icmp6len)
}
if (IN6_IS_ADDR_UNSPECIFIED(&saddr6)) {
- /* dst has to be solicited node multicast address. */
+ /* dst has to be a solicited node multicast address. */
if (daddr6.s6_addr16[0] == IPV6_ADDR_INT16_MLL &&
/* don't check ifindex portion */
daddr6.s6_addr32[1] == 0 &&
@@ -280,7 +280,7 @@ nd6_ns_input(m, off, icmp6len)
if (tentative) {
/*
* If source address is unspecified address, it is for
- * duplicated address detection.
+ * duplicate address detection.
*
* If not, the packet is for addess resolution;
* silently ignore it.
@@ -338,14 +338,14 @@ nd6_ns_input(m, off, icmp6len)
* - ND6 header source datalink address
*
* Based on RFC 2461
- * Based on RFC 2462 (duplicated address detection)
+ * Based on RFC 2462 (duplicate address detection)
*/
void
nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
struct ifnet *ifp;
const struct in6_addr *daddr6, *taddr6;
struct llinfo_nd6 *ln; /* for source address determination */
- int dad; /* duplicated address detection */
+ int dad; /* duplicate address detection */
{
struct mbuf *m;
struct ip6_hdr *ip6;
@@ -436,6 +436,10 @@ nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
struct in6_addr *hsrc = NULL;
if (ln && ln->ln_hold) {
+ /*
+ * assuming every packet in ln_hold has the same IP
+ * header
+ */
hip6 = mtod(ln->ln_hold, struct ip6_hdr *);
/* XXX pullup? */
if (sizeof(*hip6) < ln->ln_hold->m_len)
@@ -537,7 +541,7 @@ nd6_ns_output(ifp, daddr6, taddr6, ln, dad)
* Neighbor advertisement input handling.
*
* Based on RFC 2461
- * Based on RFC 2462 (duplicated address detection)
+ * Based on RFC 2462 (duplicate address detection)
*
* the following items are not implemented yet:
* - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD)
@@ -1078,7 +1082,7 @@ nd6_dad_stoptimer(dp)
}
/*
- * Start Duplicated Address Detection (DAD) for specified interface address.
+ * Start Duplicate Address Detection (DAD) for specified interface address.
*/
void
nd6_dad_start(ifa, tick)
@@ -1265,33 +1269,8 @@ nd6_dad_timer(ifa)
}
if (dp->dad_ns_icount) {
-#if 0 /* heuristics */
- /*
- * if
- * - we have sent many(?) DAD NS, and
- * - the number of NS we sent equals to the
- * number of NS we've got, and
- * - we've got no NA
- * we may have a faulty network card/driver which
- * loops back multicasts to myself.
- */
- if (3 < dp->dad_count
- && dp->dad_ns_icount == dp->dad_count
- && dp->dad_na_icount == 0) {
- log(LOG_INFO, "DAD questionable for %s(%s): "
- "network card loops back multicast?\n",
- ip6_sprintf(&ia->ia_addr.sin6_addr),
- if_name(ifa->ifa_ifp));
- /* XXX consider it a duplicate or not? */
- /* duplicate++; */
- } else {
- /* We've seen NS, means DAD has failed. */
- duplicate++;
- }
-#else
/* We've seen NS, means DAD has failed. */
duplicate++;
-#endif
}
if (duplicate) {
@@ -1301,7 +1280,7 @@ nd6_dad_timer(ifa)
} else {
/*
* We are done with DAD. No NA came, no NS came.
- * duplicated address found.
+ * No duplicate address found.
*/
ia->ia6_flags &= ~IN6_IFF_TENTATIVE;
@@ -1342,7 +1321,7 @@ nd6_dad_duplicated(ifa)
ia->ia6_flags &= ~IN6_IFF_TENTATIVE;
ia->ia6_flags |= IN6_IFF_DUPLICATED;
- /* We are done with DAD, with duplicated address found. (failure) */
+ /* We are done with DAD, with duplicate address found. (failure) */
nd6_dad_stoptimer(dp);
log(LOG_ERR, "%s: DAD complete for %s - duplicate found\n",
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 1b0792d..3b53536 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1600,10 +1600,6 @@ in6_ifadd(pr, ifid)
* (4) it is easier to manage when an interface has addresses
* with the same interface identifier, than to have multiple addresses
* with different interface identifiers.
- *
- * Mobile IPv6 addition: allow for caller to specify a wished interface
- * ID. This is to not break connections when moving addresses between
- * interfaces.
*/
ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp, 0); /* 0 is OK? */
if (ifa)
OpenPOWER on IntegriCloud