qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/3] slirp: Fix wrong mss bug.


From: Samuel Thibault
Subject: [Qemu-devel] [PULL 1/3] slirp: Fix wrong mss bug.
Date: Sat, 27 May 2017 23:46:16 +0200

From: Tao Wu <address@hidden>

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

Signed-off-by: Tao Wu <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-bu: Samuel Thibault <address@hidden>
---
 slirp/tcp_input.c | 4 ++--
 1 file 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();
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]