|
|
9ae3a8 |
From 91ca04a8a1df19f73e50733190175e137eeba933 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 20 May 2019 16:43:13 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 2/4] slirp: fix big/little endian conversion in ident protocol
|
|
|
9ae3a8 |
MIME-Version: 1.0
|
|
|
9ae3a8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
9ae3a8 |
Content-Transfer-Encoding: 8bit
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20190520164315.22140-2-marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 88093
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.7 qemu-kvm PATCH 1/3] slirp: fix big/little endian conversion in ident protocol
|
|
|
9ae3a8 |
Bugzilla: 1669068
|
|
|
9ae3a8 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
9ae3a8 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
[ MA - backported to ease backport of
|
|
|
9ae3a8 |
https://bugzilla.redhat.com/show_bug.cgi?id=1669068 ]
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
(cherry picked from 1fd71067dae501f1c78618e9583c6cc72db0cfa6)
|
|
|
9ae3a8 |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
slirp/tcp_subr.c | 4 +++-
|
|
|
9ae3a8 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
|
|
|
9ae3a8 |
index 0b7138b..80538a9 100644
|
|
|
9ae3a8 |
--- a/slirp/tcp_subr.c
|
|
|
9ae3a8 |
+++ b/slirp/tcp_subr.c
|
|
|
9ae3a8 |
@@ -601,10 +601,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
|
|
|
9ae3a8 |
tmpso->so_fport == n1) {
|
|
|
9ae3a8 |
if (getsockname(tmpso->s,
|
|
|
9ae3a8 |
(struct sockaddr *)&addr, &addrlen) == 0)
|
|
|
9ae3a8 |
- n2 = ntohs(addr.sin_port);
|
|
|
9ae3a8 |
+ n2 = addr.sin_port;
|
|
|
9ae3a8 |
break;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+ NTOHS(n1);
|
|
|
9ae3a8 |
+ NTOHS(n2);
|
|
|
9ae3a8 |
so_rcv->sb_cc = snprintf(so_rcv->sb_data,
|
|
|
9ae3a8 |
so_rcv->sb_datalen,
|
|
|
9ae3a8 |
"%d,%d\r\n", n1, n2);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|