[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULLv2 04/12] slirp: fix big/little endian conversion in i
From: |
Samuel Thibault |
Subject: |
[Qemu-devel] [PULLv2 04/12] slirp: fix big/little endian conversion in ident protocol |
Date: |
Thu, 7 Mar 2019 12:51:35 +0100 |
Signed-off-by: Samuel Thibault <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
Based-on: <address@hidden>
---
slirp/tcp_subr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index ef9d99c154..1d7e72dca7 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -660,10 +660,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
tmpso->so_fport == n1) {
if
(getsockname(tmpso->s,
(struct
sockaddr *)&addr, &addrlen) == 0)
- n2 =
ntohs(addr.sin_port);
+ n2 = addr.sin_port;
break;
}
}
+ NTOHS(n1);
+ NTOHS(n2);
so_rcv->sb_cc =
snprintf(so_rcv->sb_data,
so_rcv->sb_datalen,
"%d,%d\r\n",
n1, n2);
--
2.20.1
- [Qemu-devel] [PULLv2 00/12] slirp updates, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 02/12] slirp: check for ioctlsocket error and 0-length udp payload., Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 03/12] slirp: check sscanf result when emulating ident, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 05/12] slirp: Mark pieces missing IPv6 support, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 08/12] slirp: use "slirp_" prefix for inet_aton() win32 implementation, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 04/12] slirp: fix big/little endian conversion in ident protocol,
Samuel Thibault <=
- [Qemu-devel] [PULLv2 01/12] slirp: Fix build with gcc 9, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 07/12] slirp: use libslirp migration code, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 1/1] slirp: remove QEMU Makefile.objs, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 12/12] slirp: remove QEMU Makefile.objs, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 09/12] slirp: move sources to src/ subdirectory, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 10/12] slirp: add a standalone Makefile, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 11/12] build-sys: link with slirp as an external project, Samuel Thibault, 2019/03/07
- [Qemu-devel] [PULLv2 06/12] slirp: adapt a subset of QEMU vmstate code, Samuel Thibault, 2019/03/07
- Re: [Qemu-devel] [PULLv2 00/12] slirp updates, Peter Maydell, 2019/03/08