From: Tao Wu Date: Sat, 29 Apr 2017 17:20:56 +0000 (+0200) Subject: slirp: Fix wrong mss bug. X-Git-Tag: v2.10.0-rc0~170^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7990a26480032ad129f8c4ddad7d9a132c934ca;p=thirdparty%2Fqemu.git slirp: Fix wrong mss bug. This bug was introduced by https://github.com/qemu/qemu/commit/98c6305 Signed-off-by: Tao Wu Reviewed-by: Philippe Mathieu-Daudé Signed-off-bu: Samuel Thibault --- diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index edb98f06f30..07bcbdb2ddd 100644 --- a/slirp/tcp_input.c +++ b/slirp/tcp_input.c @@ -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();