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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: William Allen Simpson
Date: Friday, March 12, 2010 - 6:25 am

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,
although usage of int should ameliorate the issues.

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(-)

No response from testers in 21+ weeks.

[removed comment references to commit log]
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, William Allen Simpson, (Thu Mar 11, 4:35 am)
[PATCH v3 1/7] net: tcp_header_len_th and tcp_option_len_th, William Allen Simpson, (Thu Mar 11, 4:41 am)
[PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Thu Mar 11, 4:53 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Thu Mar 11, 4:54 am)
[PATCH v6 3/7] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Thu Mar 11, 5:08 am)
[PATCH v6 4/7] tcp: input header length, prediction, and t ..., William Allen Simpson, (Thu Mar 11, 5:24 am)
[PATCH v3 5/7] TCPCT part 2e: accept SYNACK data, William Allen Simpson, (Thu Mar 11, 5:31 am)
[PATCH v6 6/7] TCPCT part 2f: cleanup tcp_parse_options, William Allen Simpson, (Thu Mar 11, 5:48 am)
[PATCH v8 7/7] TCPCT part 2g: parse cookie pair and 64-bit ..., William Allen Simpson, (Thu Mar 11, 6:06 am)
Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, Eric Dumazet, (Thu Mar 11, 8:01 am)
Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, William Allen Simpson, (Thu Mar 11, 10:38 am)
Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, Joe Perches, (Thu Mar 11, 11:14 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, Simon Horman, (Thu Mar 11, 5:26 pm)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Fri Mar 12, 6:21 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Fri Mar 12, 6:25 am)
Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, William Allen Simpson, (Fri Mar 12, 6:27 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, Dan Carpenter, (Fri Mar 12, 10:46 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Fri Mar 12, 4:05 pm)
Re: [PATCH 0/7] tcp: bugs and cleanup for 2.6.34-rc1, =?utf-8?Q?Am=C3=A9ri ..., (Fri Mar 12, 10:29 pm)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, Eric Dumazet, (Sat Mar 13, 2:11 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Sat Mar 13, 4:12 am)
Re: [PATCH v4 2/7] net: remove old tcp_optlen function, Eric Dumazet, (Sat Mar 13, 4:24 am)