diff options
| author | Maxim Konovalov <maxim@FreeBSD.org> | 2007-03-24 22:15:02 +0000 |
|---|---|---|
| committer | Maxim Konovalov <maxim@FreeBSD.org> | 2007-03-24 22:15:02 +0000 |
| commit | 14739780bdb2c3dfd41657e47024d3907d8c1fcc (patch) | |
| tree | 03b986e5a07a9747b9cd66ad6c51a2faef0c27ed | |
| parent | 12fbf47cfbc67df6e41ff6ede5724b59cc617565 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/tcp_debug.h | 3 | ||||
| -rw-r--r-- | sys/netinet/tcp_input.c | 11 | ||||
| -rw-r--r-- | sys/netinet/tcp_reass.c | 11 |
3 files changed, 22 insertions, 3 deletions
diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h index 03872e2c972a..8547d0e7b7a3 100644 --- a/sys/netinet/tcp_debug.h +++ b/sys/netinet/tcp_debug.h @@ -45,10 +45,11 @@ struct tcp_debug { */ struct tcpiphdr td_ti; struct { +#define IP6_HDR_LEN 40 /* sizeof(struct ip6_hdr) */ #if !defined(_KERNEL) && defined(INET6) struct ip6_hdr ip6; #else - u_char ip6buf[40]; /* sizeof(struct ip6_hdr) */ + u_char ip6buf[IP6_HDR_LEN]; #endif struct tcphdr th; } td_ti6; diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6fdf1868fd06..00cc81872668 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); diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 6fdf1868fd06..00cc81872668 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.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); |
