summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/frag6.c2
-rw-r--r--sys/netinet6/in6.c10
-rw-r--r--sys/netinet6/in6_mcast.c2
-rw-r--r--sys/netinet6/ip6_forward.c2
-rw-r--r--sys/netinet6/ip6_id.c6
-rw-r--r--sys/netinet6/ip6protosw.h2
-rw-r--r--sys/netinet6/mld6.c4
-rw-r--r--sys/netinet6/nd6.c4
-rw-r--r--sys/netinet6/nd6_rtr.c38
9 files changed, 26 insertions, 44 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index a2f6635..b0aa5fe 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -135,7 +135,7 @@ frag6_init(void)
* fragment's Fragment header.
* -> should grab it from the first fragment only
*
- * The following note also contradicts with fragment rule - noone is going to
+ * The following note also contradicts with fragment rule - no one is going to
* send different fragment with different next header field.
*
* additional note (p22):
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 0dfaf04..902438e 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -669,14 +669,6 @@ in6_control(struct socket *so, u_long cmd, caddr_t data,
(*carp_detach_p)(&ia->ia_ifa);
goto out;
}
- if (pr == NULL) {
- if (carp_attached)
- (*carp_detach_p)(&ia->ia_ifa);
- log(LOG_ERR, "nd6_prelist_add succeeded but "
- "no prefix\n");
- error = EINVAL;
- goto out;
- }
}
/* relate the address to the prefix */
@@ -1955,7 +1947,7 @@ in6if_do_dad(struct ifnet *ifp)
/*
* Our DAD routine requires the interface up and running.
* However, some interfaces can be up before the RUNNING
- * status. Additionaly, users may try to assign addresses
+ * status. Additionally, users may try to assign addresses
* before the interface becomes up (or running).
* This function returns EAGAIN in that case.
* The caller should mark "tentative" on the address instead of
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index 9d96cf5..4effb57 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -574,7 +574,7 @@ in6m_clear_recorded(struct in6_multi *inm)
*
* Return 0 if the source didn't exist or was already marked as recorded.
* Return 1 if the source was marked as recorded by this function.
- * Return <0 if any error occured (negated errno code).
+ * Return <0 if any error occurred (negated errno code).
*/
int
in6m_record_source(struct in6_multi *inm, const struct in6_addr *addr)
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index e8810d6..3b3058b 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -282,7 +282,7 @@ ip6_forward(struct mbuf *m, int srcrt)
* ipsec6_proces_packet will send the packet using ip6_output
*/
error = ipsec6_process_packet(m, sp->req);
- /* Release SP if an error occured */
+ /* Release SP if an error occurred */
if (error != 0)
KEY_FREESP(&sp);
if (error == EJUSTRETURN) {
diff --git a/sys/netinet6/ip6_id.c b/sys/netinet6/ip6_id.c
index 3f40fa5..9a8086f 100644
--- a/sys/netinet6/ip6_id.c
+++ b/sys/netinet6/ip6_id.c
@@ -108,7 +108,7 @@ __FBSDID("$FreeBSD$");
struct randomtab {
const int ru_bits; /* resulting bits */
- const long ru_out; /* Time after wich will be reseeded */
+ const long ru_out; /* Time after which will be reseeded */
const u_int32_t ru_max; /* Uniq cycle, avoid blackjack prediction */
const u_int32_t ru_gen; /* Starting generator */
const u_int32_t ru_n; /* ru_n: prime, ru_n - 1: product of pfacts[] */
@@ -128,7 +128,7 @@ struct randomtab {
static struct randomtab randomtab_32 = {
32, /* resulting bits */
- 180, /* Time after wich will be reseeded */
+ 180, /* Time after which will be reseeded */
1000000000, /* Uniq cycle, avoid blackjack prediction */
2, /* Starting generator */
2147483629, /* RU_N-1 = 2^2*3^2*59652323 */
@@ -139,7 +139,7 @@ static struct randomtab randomtab_32 = {
static struct randomtab randomtab_20 = {
20, /* resulting bits */
- 180, /* Time after wich will be reseeded */
+ 180, /* Time after which will be reseeded */
200000, /* Uniq cycle, avoid blackjack prediction */
2, /* Starting generator */
524269, /* RU_N-1 = 2^2*3^2*14563 */
diff --git a/sys/netinet6/ip6protosw.h b/sys/netinet6/ip6protosw.h
index e8d4bad..9e80a69 100644
--- a/sys/netinet6/ip6protosw.h
+++ b/sys/netinet6/ip6protosw.h
@@ -92,7 +92,7 @@ struct pr_usrreqs;
*
* ip6c_finaldst usually points to ip6c_ip6->ip6_dst. if the original
* (internal) packet carries a routing header, it may point the final
- * dstination address in the routing header.
+ * destination address in the routing header.
*
* ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6
* (beware of flowlabel, if you try to compare it against others)
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 3c4cc99..a2f2d7e 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -971,9 +971,9 @@ out_locked:
}
/*
- * Process a recieved MLDv2 group-specific or group-and-source-specific
+ * Process a received MLDv2 group-specific or group-and-source-specific
* query.
- * Return <0 if any error occured. Currently this is ignored.
+ * Return <0 if any error occurred. Currently this is ignored.
*/
static int
mld_v2_process_group_query(struct in6_multi *inm, struct mld_ifsoftc *mli,
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 3921e32..2aaa10d 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -479,7 +479,7 @@ nd6_options(union nd_opts *ndopts)
default:
/*
* Unknown options must be silently ignored,
- * to accomodate future extension to the protocol.
+ * to accommodate future extension to the protocol.
*/
nd6log((LOG_DEBUG,
"nd6_options: unsupported option %d - "
@@ -1604,7 +1604,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
case SIOCSIFINFO_IN6:
/*
* used to change host variables from userland.
- * intented for a use on router to reflect RA configurations.
+ * intended for a use on router to reflect RA configurations.
*/
/* 0 means 'unspecified' */
if (ND.linkmtu != 0) {
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index aa7baad..988bf2b 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -482,7 +482,7 @@ nd6_rtmsg(int cmd, struct rtentry *rt)
}
/*
- * default router list proccessing sub routines
+ * default router list processing sub routines
*/
static void
@@ -993,11 +993,9 @@ nd6_prelist_add(struct nd_prefixctl *pr, struct nd_defrouter *dr,
new->ndpr_flags = pr->ndpr_flags;
if ((error = in6_init_prefix_ltimes(new)) != 0) {
free(new, M_IP6NDP);
- return(error);
+ return (error);
}
new->ndpr_lastupdate = time_uptime;
- if (newp != NULL)
- *newp = new;
/* initialization */
LIST_INIT(&new->ndpr_advrtrs);
@@ -1021,10 +1019,11 @@ nd6_prelist_add(struct nd_prefixctl *pr, struct nd_defrouter *dr,
}
}
- if (dr)
+ if (dr != NULL)
pfxrtr_add(new, dr);
-
- return 0;
+ if (newp != NULL)
+ *newp = new;
+ return (0);
}
void
@@ -1081,7 +1080,6 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr,
struct ifnet *ifp = new->ndpr_ifp;
struct nd_prefix *pr;
int error = 0;
- int newprefix = 0;
int auth;
struct in6_addrlifetime lt6_tmp;
char ip6buf[INET6_ADDRSTRLEN];
@@ -1139,23 +1137,17 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr,
if (dr && pfxrtr_lookup(pr, dr) == NULL)
pfxrtr_add(pr, dr);
} else {
- struct nd_prefix *newpr = NULL;
-
- newprefix = 1;
-
if (new->ndpr_vltime == 0)
goto end;
if (new->ndpr_raf_onlink == 0 && new->ndpr_raf_auto == 0)
goto end;
- error = nd6_prelist_add(new, dr, &newpr);
- if (error != 0 || newpr == NULL) {
+ error = nd6_prelist_add(new, dr, &pr);
+ if (error != 0) {
nd6log((LOG_NOTICE, "prelist_update: "
- "nd6_prelist_add failed for %s/%d on %s "
- "errno=%d, returnpr=%p\n",
+ "nd6_prelist_add failed for %s/%d on %s errno=%d\n",
ip6_sprintf(ip6buf, &new->ndpr_prefix.sin6_addr),
- new->ndpr_plen, if_name(new->ndpr_ifp),
- error, newpr));
+ new->ndpr_plen, if_name(new->ndpr_ifp), error));
goto end; /* we should just give up in this case. */
}
@@ -1166,13 +1158,11 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr,
* addresses. Thus, we explicitly make sure that the prefix
* itself expires now.
*/
- if (newpr->ndpr_raf_onlink == 0) {
- newpr->ndpr_vltime = 0;
- newpr->ndpr_pltime = 0;
- in6_init_prefix_ltimes(newpr);
+ if (pr->ndpr_raf_onlink == 0) {
+ pr->ndpr_vltime = 0;
+ pr->ndpr_pltime = 0;
+ in6_init_prefix_ltimes(pr);
}
-
- pr = newpr;
}
/*
OpenPOWER on IntegriCloud