Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- added some comments

- removed an unnecesary code
  • Loading branch information...
commit 53bec605b236bde1ebc0f29cce5094b8ea1fa957 1 parent 6484505
suz authored
Showing with 12 additions and 3 deletions.
  1. +7 −2 kame/sys/netinet6/nd6.c
  2. +5 −1 kame/sys/netinet6/nd6_nbr.c
View
9 kame/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $KAME: nd6.c,v 1.400 2007/05/04 01:43:28 suz Exp $ */
+/* $KAME: nd6.c,v 1.401 2007/05/04 04:48:52 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -2147,6 +2147,12 @@ nd6_cache_lladdr(ifp, from, lladdr, lladdrlen, type, code)
if (ln->ln_hold) {
struct mbuf *m_hold, *m_hold_next;
+
+ /*
+ * reset the ln_hold in advance, to explicitly
+ * prevent a ln_hold lookup in nd6_output()
+ * (wouldn't happen, though...)
+ */
for (m_hold = ln->ln_hold, ln->ln_hold = NULL;
m_hold; m_hold = m_hold_next) {
m_hold_next = m_hold->m_nextpkt;
@@ -2161,7 +2167,6 @@ nd6_cache_lladdr(ifp, from, lladdr, lladdrlen, type, code)
(struct sockaddr_in6 *)rt_key(rt),
rt);
}
- ln->ln_hold = NULL;
}
} else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
/* probe right away */
View
6 kame/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $KAME: nd6_nbr.c,v 1.172 2007/05/04 01:43:28 suz Exp $ */
+/* $KAME: nd6_nbr.c,v 1.173 2007/05/04 04:48:52 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -927,6 +927,10 @@ nd6_na_input(m, off, icmp6len)
if (ln->ln_hold) {
struct mbuf *m_hold, *m_hold_next;
+ /*
+ * reset the ln_hold in advance, to explicitly prevent a
+ * ln_hold lookup in nd6_output() (wouldn't happen, though...)
+ */
for (m_hold = ln->ln_hold, ln->ln_hold = NULL;
m_hold; m_hold = m_hold_next) {
m_hold_next = m_hold->m_nextpkt;
Please sign in to comment.
Something went wrong with that request. Please try again.