qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

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