slirp: Fix wrong mss bug.

This bug was introduced by https://github.com/qemu/qemu/commit/98c6305

Signed-off-by: Tao Wu <lepton@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-bu: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
Tao Wu 2017-04-29 19:20:56 +02:00 committed by Samuel Thibault
parent 9964e96dc9
commit c7990a2648

View file

@ -1587,11 +1587,11 @@ tcp_mss(struct tcpcb *tp, u_int offer)
switch (so->so_ffamily) {
case AF_INET:
mss = MIN(IF_MTU, IF_MRU) - sizeof(struct tcphdr)
+ sizeof(struct ip);
- sizeof(struct ip);
break;
case AF_INET6:
mss = MIN(IF_MTU, IF_MRU) - sizeof(struct tcphdr)
+ sizeof(struct ip6);
- sizeof(struct ip6);
break;
default:
g_assert_not_reached();