diff options
author | Gao Feng <fgao@ikuai8.com> | 2017-04-19 04:23:42 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-04-19 18:55:17 +0300 |
commit | 122868b378094853b376f3e2ac833bcee078eb3c (patch) | |
tree | 2a67950d7a07a8ff563f500af413d017c0e9c470 /net/netfilter/nf_synproxy_core.c | |
parent | be7be6e161a218e92c4e46b97ba59c1e40cfea9c (diff) | |
download | linux-122868b378094853b376f3e2ac833bcee078eb3c.tar.xz |
netfilter: tcp: Use TCP_MAX_WSCALE instead of literal 14
The window scale may be enlarged from 14 to 15 according to the itef
draft https://tools.ietf.org/html/draft-nishida-tcpm-maxwin-03.
Use the macro TCP_MAX_WSCALE to support it easily with TCP stack in
the future.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_synproxy_core.c')
-rw-r--r-- | net/netfilter/nf_synproxy_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c index abe03e869f7b..a504e87c6ddf 100644 --- a/net/netfilter/nf_synproxy_core.c +++ b/net/netfilter/nf_synproxy_core.c @@ -66,8 +66,8 @@ synproxy_parse_options(const struct sk_buff *skb, unsigned int doff, case TCPOPT_WINDOW: if (opsize == TCPOLEN_WINDOW) { opts->wscale = *ptr; - if (opts->wscale > 14) - opts->wscale = 14; + if (opts->wscale > TCP_MAX_WSCALE) + opts->wscale = TCP_MAX_WSCALE; opts->options |= XT_SYNPROXY_OPT_WSCALE; } break; |