diff options
author | andre <andre@FreeBSD.org> | 2007-04-20 15:28:01 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-04-20 15:28:01 +0000 |
commit | 0af88c9154ebdd3bfcb191d7a902347bb26911a5 (patch) | |
tree | 038867f16b2ace6b644d912b765328e4921de46f | |
parent | a08a16ab4002000223fadd38dfcf1e6fcfc9978a (diff) | |
download | FreeBSD-src-0af88c9154ebdd3bfcb191d7a902347bb26911a5.zip FreeBSD-src-0af88c9154ebdd3bfcb191d7a902347bb26911a5.tar.gz |
o Remove unncessary TOF_SIGLEN flag from struct tcpopt
o Correctly set to->to_signature in tcp_dooptions()
o Update comments
-rw-r--r-- | sys/netinet/tcp_input.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 11 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 2658d59..3cbc817 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2716,7 +2716,8 @@ tcp_dooptions(struct tcpopt *to, u_char *cp, int cnt, int flags) case TCPOPT_SIGNATURE: if (optlen != TCPOLEN_SIGNATURE) continue; - to->to_flags |= (TOF_SIGNATURE | TOF_SIGLEN); + to->to_flags |= TOF_SIGNATURE; + to->to_signature = cp + 2; break; #endif case TCPOPT_SACK_PERMITTED: diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 2658d59..3cbc817 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -2716,7 +2716,8 @@ tcp_dooptions(struct tcpopt *to, u_char *cp, int cnt, int flags) case TCPOPT_SIGNATURE: if (optlen != TCPOLEN_SIGNATURE) continue; - to->to_flags |= (TOF_SIGNATURE | TOF_SIGLEN); + to->to_flags |= TOF_SIGNATURE; + to->to_signature = cp + 2; break; #endif case TCPOPT_SACK_PERMITTED: diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index fad4cf4..9160c48 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -231,17 +231,16 @@ struct tcpopt { #define TOF_SCALE 0x0002 /* window scaling */ #define TOF_SACKPERM 0x0004 /* SACK permitted */ #define TOF_TS 0x0010 /* timestamp */ -#define TOF_SIGNATURE 0x0040 /* signature option present */ -#define TOF_SIGLEN 0x0080 /* signature length valid (RFC2385) */ -#define TOF_SACK 0x0100 /* Peer sent SACK option */ -#define TOF_MAXOPT 0x0200 - u_int32_t to_tsval; /* our new timestamp */ +#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ +#define TOF_SACK 0x0080 /* Peer sent SACK option */ +#define TOF_MAXOPT 0x0100 + u_int32_t to_tsval; /* new timestamp */ u_int32_t to_tsecr; /* reflected timestamp */ u_int16_t to_mss; /* maximum segment size */ u_int8_t to_wscale; /* window scaling */ u_int8_t to_nsacks; /* number of SACK blocks */ u_char *to_sacks; /* pointer to the first SACK blocks */ - u_char *to_signature; /* pointer to the MD5 signature */ + u_char *to_signature; /* pointer to the TCP-MD5 signature */ }; /* |