diff options
author | andre <andre@FreeBSD.org> | 2007-04-20 15:08:09 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-04-20 15:08:09 +0000 |
commit | 853a532b7f46191440705eb23979690998beb8b0 (patch) | |
tree | 2af00482591182db0a737a91478ea46466671957 /sys/netinet/tcp_output.c | |
parent | edec8cf92bff97762899e3f08bf27d67c2a8a148 (diff) | |
download | FreeBSD-src-853a532b7f46191440705eb23979690998beb8b0.zip FreeBSD-src-853a532b7f46191440705eb23979690998beb8b0.tar.gz |
o Remove unused and redundant TCP option definitions
o Replace usage of MAX_TCPOPTLEN with the correctly constructed and
derived MAX_TCPOPTLEN
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 1b05abb..9916f28 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1319,7 +1319,7 @@ tcp_addoptions(struct tcpopt *to, u_char *optp) optlen += TCPOLEN_NOP; *optp++ = TCPOPT_NOP; } - if (MAX_TCPOPTLEN - optlen < TCPOLEN_SIGNATURE) + if (TCP_MAXOLEN - optlen < TCPOLEN_SIGNATURE) continue; optlen += TCPOLEN_SIGNATURE; *optp++ = TCPOPT_SIGNATURE; @@ -1339,12 +1339,12 @@ tcp_addoptions(struct tcpopt *to, u_char *optp) optlen += TCPOLEN_NOP; *optp++ = TCPOPT_NOP; } - if (MAX_TCPOPTLEN - optlen < 2 + TCPOLEN_SACK) + if (TCP_MAXOLEN - optlen < 2 + TCPOLEN_SACK) continue; optlen += TCPOLEN_SACKHDR; *optp++ = TCPOPT_SACK; sackblks = min(to->to_nsacks, - (MAX_TCPOPTLEN - optlen) / TCPOLEN_SACK); + (TCP_MAXOLEN - optlen) / TCPOLEN_SACK); *optp++ = TCPOLEN_SACKHDR + sackblks * TCPOLEN_SACK; while (sackblks--) { sack_seq = htonl(sack->start); @@ -1375,6 +1375,6 @@ tcp_addoptions(struct tcpopt *to, u_char *optp) *optp++ = TCPOPT_NOP; } - KASSERT(optlen <= MAX_TCPOPTLEN, ("%s: TCP options too long", __func__)); + KASSERT(optlen <= TCP_MAXOLEN, ("%s: TCP options too long", __func__)); return (optlen); } |