o Remove unncessary TOF_SIGLEN flag from struct tcpopt

o Correctly set to->to_signature in tcp_dooptions()
o Update comments
This commit is contained in:
Andre Oppermann 2007-04-20 15:28:01 +00:00
parent 7824d002c0
commit df47e4377b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168906
3 changed files with 9 additions and 8 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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 */
};
/*