[PATCH v3 2/7] net: remove old tcp_optlen function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: William Allen Simpson
Date: Saturday, February 13, 2010 - 11:09 pm

The tcp_optlen() function returns a potential *negative* unsigned.

In the only two existing files using the old tcp_optlen() function,
clean up confusing and inconsistent mixing of both byte and word
offsets, and other coding style issues.  Document assumptions.

Quoth David Miller:
    This is transmit, and the packets can only come from the Linux
    TCP stack, not some external entity.

    You're being way too anal here, and adding these checks to
    drivers would be just a lot of rediculious bloat. [sic]

Therefore, there are *no* checks for bad TCP and IP header sizes, nor
any semantic changes.  The drivers should function exactly as existing.

No response from testers in 17+ weeks.

Requires:
   net: tcp_header_len_th and tcp_option_len_th

Signed-off-by: William.Allen.Simpson@gmail.com
CC: Michael Chan <mchan@broadcom.com>
---
  drivers/net/bnx2.c  |   29 +++++++++++++-----------
  drivers/net/tg3.c   |   60 +++++++++++++++++++++++---------------------------
  include/linux/tcp.h |    5 ----
  3 files changed, 44 insertions(+), 50 deletions(-)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/7] tcp: bugs and cleanup updated to 2.6.33-rc8, William Allen Simpson, (Sat Feb 13, 11:01 pm)
[PATCH v3 1/7] net: tcp_header_len_th and tcp_option_len_th, William Allen Simpson, (Sat Feb 13, 11:05 pm)
[PATCH v3 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Sat Feb 13, 11:09 pm)
[PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Sat Feb 13, 11:16 pm)
[PATCH v4 4/7] tcp: input header length, prediction, and t ..., William Allen Simpson, (Sat Feb 13, 11:21 pm)
[PATCH v3 5/7] TCPCT part 2e: accept SYNACK data, William Allen Simpson, (Sat Feb 13, 11:26 pm)
[PATCH v4 6/7] TCPCT part 2f: cleanup tcp_parse_options, William Allen Simpson, (Sat Feb 13, 11:41 pm)
[PATCH v6 7/7] TCPCT part 2g: parse cookie pair and 64-bit ..., William Allen Simpson, (Sun Feb 14, 12:02 am)
Re: [PATCH v3 2/7] net: remove old tcp_optlen function, David Miller, (Wed Feb 17, 4:43 pm)