提交 c7990a26 编写于 作者: T Tao Wu 提交者: Samuel Thibault

slirp: Fix wrong mss bug.

This bug was introduced by https://github.com/qemu/qemu/commit/98c6305Signed-off-by: NTao Wu <lepton@google.com>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-bu: Samuel Thibault <samuel.thibault@ens-lyon.org>
上级 9964e96d
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册