Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TEMPORARILY fixed the problem of mbuf pointer inconsistency on

ip6_savecontrol().
Note: we'll soon make a more natural fix after getting a consensus.
  • Loading branch information...
commit 17ff46d73692efabb39780272e94bb4e21ec7a61 1 parent e45b4cd
jinmei authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 freebsd3/sys/netinet/tcp_input.c
View
23 freebsd3/sys/netinet/tcp_input.c
@@ -705,7 +705,19 @@ tcp_input(m, off, proto)
m_freem(inp->in6p_options);
inp->in6p_options = 0;
}
+
+ /*
+ * Temporarily re-adjusting the mbuf before ip6_savecontrol(),
+ * which is necessary for FreeBSD only due to difference from
+ * other BSD stacks.
+ * XXX: we'll soon make a more natural fix after getting a
+ * consensus.
+ */
+ m->m_data -= hdroptlen;
+ m->m_len += hdroptlen;
ip6_savecontrol(inp, &inp->in6p_options, ip6, m);
+ m->m_data += hdroptlen; /* XXX */
+ m->m_len -= hdroptlen; /* XXX */
}
#endif /* INET6 */
@@ -843,9 +855,20 @@ tcp_input(m, off, proto)
m_freem(inp->in6p_options);
inp->in6p_options = 0;
}
+ /*
+ * Temporarily re-adjusting the mbuf
+ * before ip6_savecontrol().
+ * XXX: we'll soon make a more natural
+ * fix after getting a consensus.
+ * (see above)
+ */
+ m->m_data -= hdroptlen;
+ m->m_len += hdroptlen;
ip6_savecontrol(inp,
&inp->in6p_options,
ip6, m);
+ m->m_data += hdroptlen; /* XXX */
+ m->m_len -= hdroptlen; /* XXX */
}
} else
#endif /* INET6 */
Please sign in to comment.
Something went wrong with that request. Please try again.