Blame SOURCES/kvm-slirp-fix-big-little-endian-conversion-in-ident-prot.patch

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