slirp updates
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErr90SPq5RTpFUjkOsKUb9YyRecUFAlkp8WEACgkQsKUb9YyR ecX5og/+OC9gjvyggkUTG9So8ODtMTXKA4SIoQrW8y7vrb/fc5XpqVEILiMThP6/ O9KNPKU4AYzHYcIGX/opI9NF7h3HWWbbbpl9rh69DEXZtSY8jEcsvjO01kKOa439 DEdGx2r8Aanq3a29pkv/8BGr2r6gxRUGdBusEufsbV/YowR+Is4tRWVvuERGaLCs 1uChhy344zYQaIlXxZOCuA3afx/cLUJZDy6YSDWHEP0JNN5u5qNwODWjkdaNDpfJ 9hTKQ1NWuFVneUkDFQB34YpLZzTwNGlXasSsAJFwd0GLbYC9MQHeb254BkGbpuTn vJeg29xv+ZW6B1RrkQlyRb68cqTsNVAb0bbAQh+0uXftS62Hj/EXb+SUbRjH2cy7 SMtDIeOkbhIIvKb1jUlfYGi5GFrlwMpzsS56f3Za2w+jomuWUirn674m5LTPCAW8 WudIEFxH6LCjnIFg5rVB5t1eFVD3kNGAU8NFCKkL1eQ+MDHrIdfW48B7iWjbf72k BD0n1uY3vHoTsxFFIBvej4kaXIG5D6yLKEErcY0xOwlTPGkv17ynQVNqvBchdSPs KT5i5tSzEReLR+KZosOYpKupTcjElTD7PHXneD4Qt4jNyMHBI4dVkPxS/781VnjK 6q1I1vfCDhjz15I7dmZla7btxcj2nfRVM0JachpT3pnUgFey11U= =4CKq -----END PGP SIGNATURE----- Merge remote-tracking branch 'sthibault/tags/samuel-thibault' into staging slirp updates # gpg: Signature made Sat 27 May 2017 10:36:33 PM BST # gpg: using RSA key 0xB0A51BF58C9179C5 # gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>" # gpg: aka "Samuel Thibault <sthibault@debian.org>" # gpg: aka "Samuel Thibault <samuel.thibault@gnu.org>" # gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" # gpg: aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>" # Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6 # Subkey fingerprint: AEBF 7448 FAB9 453A 4552 390E B0A5 1BF5 8C91 79C5 * sthibault/tags/samuel-thibault: Fix total IP header length in forwarded TCP packets slirp: fix leak slirp: Fix wrong mss bug. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
commit
08f44282c1
@ -100,6 +100,9 @@ sofree(struct socket *so)
|
||||
if(so->so_next && so->so_prev)
|
||||
remque(so); /* crashes if so is not in a queue */
|
||||
|
||||
if (so->so_tcpcb) {
|
||||
free(so->so_tcpcb);
|
||||
}
|
||||
free(so);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -204,7 +204,7 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m,
|
||||
m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct tcphdr)
|
||||
- sizeof(struct ip);
|
||||
ip = mtod(m, struct ip *);
|
||||
ip->ip_len = tlen;
|
||||
ip->ip_len = m->m_len;
|
||||
ip->ip_dst = tcpiph_save.ti_dst;
|
||||
ip->ip_src = tcpiph_save.ti_src;
|
||||
ip->ip_p = tcpiph_save.ti_pr;
|
||||
@ -224,7 +224,7 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m,
|
||||
m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct tcphdr)
|
||||
- sizeof(struct ip6);
|
||||
ip6 = mtod(m, struct ip6 *);
|
||||
ip6->ip_pl = tlen;
|
||||
ip6->ip_pl = tcpiph_save.ti_len;
|
||||
ip6->ip_dst = tcpiph_save.ti_dst6;
|
||||
ip6->ip_src = tcpiph_save.ti_src6;
|
||||
ip6->ip_nh = tcpiph_save.ti_nh6;
|
||||
|
Loading…
Reference in New Issue
Block a user