summaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
authorTao Wu <ytht.net@gmail.com>2017-04-29 19:20:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-05-27 23:34:47 +0200
commitc7990a26480032ad129f8c4ddad7d9a132c934ca (patch)
tree7dfe06995928a2f7c9c78f67abed4fc8c8487988 /slirp
parent9964e96dc9999cf7f7c936ee854a795415d19b60 (diff)
downloadqemu-c7990a26480032ad129f8c4ddad7d9a132c934ca.tar.gz
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>
Diffstat (limited to 'slirp')
-rw-r--r--slirp/tcp_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index edb98f06f3..07bcbdb2dd 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();