Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166721
b: refs/heads/master
c: 89e95a6
h: refs/heads/master
i:
  166719: 88ed0f1
v: v3
  • Loading branch information
Ori Finkelman authored and David S. Miller committed Oct 1, 2009
1 parent 4c7312b commit 4018cfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fdb78d3093a347456e108b77d56d493d29071b2
refs/heads/master: 89e95a613c8a045ce0c5b992ba19f10613f6ab2f
11 changes: 6 additions & 5 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ static inline int tcp_urg_mode(const struct tcp_sock *tp)
#define OPTION_SACK_ADVERTISE (1 << 0)
#define OPTION_TS (1 << 1)
#define OPTION_MD5 (1 << 2)
#define OPTION_WSCALE (1 << 3)

struct tcp_out_options {
u8 options; /* bit field of OPTION_* */
Expand Down Expand Up @@ -427,7 +428,7 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
TCPOLEN_SACK_PERM);
}

if (unlikely(opts->ws)) {
if (unlikely(OPTION_WSCALE & opts->options)) {
*ptr++ = htonl((TCPOPT_NOP << 24) |
(TCPOPT_WINDOW << 16) |
(TCPOLEN_WINDOW << 8) |
Expand Down Expand Up @@ -494,8 +495,8 @@ static unsigned tcp_syn_options(struct sock *sk, struct sk_buff *skb,
}
if (likely(sysctl_tcp_window_scaling)) {
opts->ws = tp->rx_opt.rcv_wscale;
if (likely(opts->ws))
size += TCPOLEN_WSCALE_ALIGNED;
opts->options |= OPTION_WSCALE;
size += TCPOLEN_WSCALE_ALIGNED;
}
if (likely(sysctl_tcp_sack)) {
opts->options |= OPTION_SACK_ADVERTISE;
Expand Down Expand Up @@ -537,8 +538,8 @@ static unsigned tcp_synack_options(struct sock *sk,

if (likely(ireq->wscale_ok)) {
opts->ws = ireq->rcv_wscale;
if (likely(opts->ws))
size += TCPOLEN_WSCALE_ALIGNED;
opts->options |= OPTION_WSCALE;
size += TCPOLEN_WSCALE_ALIGNED;
}
if (likely(doing_ts)) {
opts->options |= OPTION_TS;
Expand Down

0 comments on commit 4018cfb

Please sign in to comment.