|
|
4ec855 |
From f4157e1c90e8986d95a57bf00cc8c0e297869c35 Mon Sep 17 00:00:00 2001
|
|
|
4ec855 |
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@redhat.com>
|
|
|
4ec855 |
Date: Wed, 24 Jul 2019 15:53:35 +0100
|
|
|
4ec855 |
Subject: [PATCH 10/14] slirp: fix big/little endian conversion in ident
|
|
|
4ec855 |
protocol
|
|
|
4ec855 |
MIME-Version: 1.0
|
|
|
4ec855 |
Content-Type: text/plain; charset=UTF-8
|
|
|
4ec855 |
Content-Transfer-Encoding: 8bit
|
|
|
4ec855 |
|
|
|
4ec855 |
RH-Author: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
4ec855 |
Message-id: <20190724155337.25303-3-philmd@redhat.com>
|
|
|
4ec855 |
Patchwork-id: 89674
|
|
|
4ec855 |
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH v2 2/4] slirp: fix big/little endian conversion in ident protocol
|
|
|
4ec855 |
Bugzilla: 1727642
|
|
|
4ec855 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
4ec855 |
|
|
|
4ec855 |
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
4ec855 |
|
|
|
4ec855 |
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
4ec855 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
4ec855 |
(cherry picked from commit 1fd71067dae501f1c78618e9583c6cc72db0cfa6)
|
|
|
4ec855 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
4ec855 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
4ec855 |
---
|
|
|
4ec855 |
slirp/tcp_subr.c | 4 +++-
|
|
|
4ec855 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
4ec855 |
|
|
|
4ec855 |
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
|
|
|
4ec855 |
index af1b3eb..393447d 100644
|
|
|
4ec855 |
--- a/slirp/tcp_subr.c
|
|
|
4ec855 |
+++ b/slirp/tcp_subr.c
|
|
|
4ec855 |
@@ -661,10 +661,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
|
|
|
4ec855 |
tmpso->so_fport == n1) {
|
|
|
4ec855 |
if (getsockname(tmpso->s,
|
|
|
4ec855 |
(struct sockaddr *)&addr, &addrlen) == 0)
|
|
|
4ec855 |
- n2 = ntohs(addr.sin_port);
|
|
|
4ec855 |
+ n2 = addr.sin_port;
|
|
|
4ec855 |
break;
|
|
|
4ec855 |
}
|
|
|
4ec855 |
}
|
|
|
4ec855 |
+ NTOHS(n1);
|
|
|
4ec855 |
+ NTOHS(n2);
|
|
|
4ec855 |
so_rcv->sb_cc = snprintf(so_rcv->sb_data,
|
|
|
4ec855 |
so_rcv->sb_datalen,
|
|
|
4ec855 |
"%d,%d\r\n", n1, n2);
|
|
|
4ec855 |
--
|
|
|
4ec855 |
1.8.3.1
|
|
|
4ec855 |
|