diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_TCPMSS.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index a75240f0d42b..afaebc766933 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
@@ -125,6 +125,12 @@ tcpmss_mangle_packet(struct sk_buff *skb, | |||
125 | 125 | ||
126 | skb_put(skb, TCPOLEN_MSS); | 126 | skb_put(skb, TCPOLEN_MSS); |
127 | 127 | ||
128 | /* RFC 879 states that the default MSS is 536 without specific | ||
129 | * knowledge that the destination host is prepared to accept larger. | ||
130 | * Since no MSS was provided, we MUST NOT set a value > 536. | ||
131 | */ | ||
132 | newmss = min(newmss, (u16)536); | ||
133 | |||
128 | opt = (u_int8_t *)tcph + sizeof(struct tcphdr); | 134 | opt = (u_int8_t *)tcph + sizeof(struct tcphdr); |
129 | memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr)); | 135 | memmove(opt + TCPOLEN_MSS, opt, tcplen - sizeof(struct tcphdr)); |
130 | 136 | ||