diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 20:38:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-27 20:38:07 -0400 |
commit | b09331e530777963ed65ce2fdf074b7b077768c7 (patch) | |
tree | 0354e5a7bb8ec3a7ae647b5ce71516f6a4979b05 /net/ipv4/tcp_output.c | |
parent | 4c246edd2550304df5b766cc841584b2bb058843 (diff) | |
parent | d97240552cd98c4b07322f30f66fd9c3ba4171de (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
sctp: fix random memory dereference with SCTP_HMAC_IDENT option.
sctp: correct bounds check in sctp_setsockopt_auth_key
wan: Missing capability checks in sbni_ioctl()
e100, fix iomap read
qeth: preallocated header account offset
qeth: l2 write unicast list to hardware
qeth: use -EOPNOTSUPP instead of -ENOTSUPP.
ibm_newemac: Don't call dev_mc_add() before device is registered
net: don't grab a mutex within a timer context in gianfar
forcedeth: fix checksum flag
net/usb/mcs7830: add set_mac_address
net/usb/mcs7830: new device IDs
[netdrvr] smc91x: fix resource removal (null ptr deref)
ibmveth: fix bad UDP checksums
[netdrvr] hso: dev_kfree_skb crash fix
[netdrvr] hso: icon 322 detection fix
atl1: disable TSO by default
atl1e: multistatement if missing braces
igb: remove 82576 quad adapter
drivers/net/skfp/ess.c: fix compile warnings
...
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index a00532de2a8c..8165f5aa8c71 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -468,7 +468,8 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, | |||
468 | } | 468 | } |
469 | if (likely(sysctl_tcp_window_scaling)) { | 469 | if (likely(sysctl_tcp_window_scaling)) { |
470 | opts->ws = tp->rx_opt.rcv_wscale; | 470 | opts->ws = tp->rx_opt.rcv_wscale; |
471 | size += TCPOLEN_WSCALE_ALIGNED; | 471 | if(likely(opts->ws)) |
472 | size += TCPOLEN_WSCALE_ALIGNED; | ||
472 | } | 473 | } |
473 | if (likely(sysctl_tcp_sack)) { | 474 | if (likely(sysctl_tcp_sack)) { |
474 | opts->options |= OPTION_SACK_ADVERTISE; | 475 | opts->options |= OPTION_SACK_ADVERTISE; |
@@ -509,7 +510,8 @@ static unsigned tcp_synack_options(struct sock *sk, | |||
509 | 510 | ||
510 | if (likely(ireq->wscale_ok)) { | 511 | if (likely(ireq->wscale_ok)) { |
511 | opts->ws = ireq->rcv_wscale; | 512 | opts->ws = ireq->rcv_wscale; |
512 | size += TCPOLEN_WSCALE_ALIGNED; | 513 | if(likely(opts->ws)) |
514 | size += TCPOLEN_WSCALE_ALIGNED; | ||
513 | } | 515 | } |
514 | if (likely(doing_ts)) { | 516 | if (likely(doing_ts)) { |
515 | opts->options |= OPTION_TS; | 517 | opts->options |= OPTION_TS; |