o Use a define for a buffer size.
Prodded by: db o Add missed vars for TCPDEBUG in tcp_do_segment(). Prodded by: tinderbox
This commit is contained in:
parent
12fbf47cfb
commit
14739780bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167873
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user