diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:51 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:59 -0400 |
| commit | 2c96c142e941041973faab20ca3b82d57f435c5e (patch) | |
| tree | 45188f0ecb3f4bb7408a7219f8fcd041d500235a /net/ipv4/tcp_output.c | |
| parent | 3c355863fb32070a2800f41106519c5c3038623a (diff) | |
| parent | 8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab (diff) | |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up tracing/filters fix from the urgent queue,
we will queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 5200aab0ca97..fcd278a7080e 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -361,6 +361,7 @@ static inline int tcp_urg_mode(const struct tcp_sock *tp) | |||
| 361 | #define OPTION_SACK_ADVERTISE (1 << 0) | 361 | #define OPTION_SACK_ADVERTISE (1 << 0) |
| 362 | #define OPTION_TS (1 << 1) | 362 | #define OPTION_TS (1 << 1) |
| 363 | #define OPTION_MD5 (1 << 2) | 363 | #define OPTION_MD5 (1 << 2) |
| 364 | #define OPTION_WSCALE (1 << 3) | ||
| 364 | 365 | ||
| 365 | struct tcp_out_options { | 366 | struct tcp_out_options { |
| 366 | u8 options; /* bit field of OPTION_* */ | 367 | u8 options; /* bit field of OPTION_* */ |
| @@ -427,7 +428,7 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, | |||
| 427 | TCPOLEN_SACK_PERM); | 428 | TCPOLEN_SACK_PERM); |
| 428 | } | 429 | } |
| 429 | 430 | ||
| 430 | if (unlikely(opts->ws)) { | 431 | if (unlikely(OPTION_WSCALE & opts->options)) { |
| 431 | *ptr++ = htonl((TCPOPT_NOP << 24) | | 432 | *ptr++ = htonl((TCPOPT_NOP << 24) | |
| 432 | (TCPOPT_WINDOW << 16) | | 433 | (TCPOPT_WINDOW << 16) | |
| 433 | (TCPOLEN_WINDOW << 8) | | 434 | (TCPOLEN_WINDOW << 8) | |
| @@ -494,8 +495,8 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb, | |||
| 494 | } | 495 | } |
| 495 | if (likely(sysctl_tcp_window_scaling)) { | 496 | if (likely(sysctl_tcp_window_scaling)) { |
| 496 | opts->ws = tp->rx_opt.rcv_wscale; | 497 | opts->ws = tp->rx_opt.rcv_wscale; |
| 497 | if (likely(opts->ws)) | 498 | opts->options |= OPTION_WSCALE; |
| 498 | size += TCPOLEN_WSCALE_ALIGNED; | 499 | size += TCPOLEN_WSCALE_ALIGNED; |
| 499 | } | 500 | } |
| 500 | if (likely(sysctl_tcp_sack)) { | 501 | if (likely(sysctl_tcp_sack)) { |
| 501 | opts->options |= OPTION_SACK_ADVERTISE; | 502 | opts->options |= OPTION_SACK_ADVERTISE; |
| @@ -537,8 +538,8 @@ static unsigned tcp_synack_options(struct sock *sk, | |||
| 537 | 538 | ||
| 538 | if (likely(ireq->wscale_ok)) { | 539 | if (likely(ireq->wscale_ok)) { |
| 539 | opts->ws = ireq->rcv_wscale; | 540 | opts->ws = ireq->rcv_wscale; |
| 540 | if (likely(opts->ws)) | 541 | opts->options |= OPTION_WSCALE; |
| 541 | size += TCPOLEN_WSCALE_ALIGNED; | 542 | size += TCPOLEN_WSCALE_ALIGNED; |
| 542 | } | 543 | } |
| 543 | if (likely(doing_ts)) { | 544 | if (likely(doing_ts)) { |
| 544 | opts->options |= OPTION_TS; | 545 | opts->options |= OPTION_TS; |
