summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2007-03-24 22:15:02 +0000
committermaxim <maxim@FreeBSD.org>2007-03-24 22:15:02 +0000
commitd789919b3a4dee402f0711ab34179e19eef81166 (patch)
tree03b986e5a07a9747b9cd66ad6c51a2faef0c27ed /sys/netinet/tcp_input.c
parent8561f36aa3abcc9976e5452c93bd0394586f0d0d (diff)
downloadFreeBSD-src-d789919b3a4dee402f0711ab34179e19eef81166.zip
FreeBSD-src-d789919b3a4dee402f0711ab34179e19eef81166.tar.gz
o Use a define for a buffer size.
Prodded by: db o Add missed vars for TCPDEBUG in tcp_do_segment(). Prodded by: tinderbox
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 6fdf186..00cc818 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -465,7 +465,7 @@ tcp_input(struct mbuf *m, int off0)
* The size of tcp_saveipgen must be the size of the max ip header,
* now IPv6.
*/
- u_char tcp_saveipgen[40];
+ u_char tcp_saveipgen[IP6_HDR_LEN];
struct tcphdr tcp_savetcp;
short ostate = 0;
#endif
@@ -1028,6 +1028,15 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
u_long tiwin;
struct tcpopt to;
+#ifdef TCPDEBUG
+ /*
+ * The size of tcp_saveipgen must be the size of the max ip header,
+ * now IPv6.
+ */
+ u_char tcp_saveipgen[IP6_HDR_LEN];
+ struct tcphdr tcp_savetcp;
+ short ostate = 0;
+#endif
thflags = th->th_flags;
INP_INFO_WLOCK_ASSERT(&tcbinfo);
OpenPOWER on IntegriCloud