usbredirect: listen on correct address
(cherry picked from commit 281b1f64ecba8505039b14a681f1ed2136e5e282)
This commit is contained in:
parent
089cd0e597
commit
7748e978ea
34
0001-usbredirect-listen-on-correct-address.patch
Normal file
34
0001-usbredirect-listen-on-correct-address.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From bf307aeb470f40ffc41ecc909fbd2e65cda3640e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Fullmer <danielrf12@gmail.com>
|
||||||
|
Date: Mon, 25 Jul 2022 19:51:34 -0700
|
||||||
|
Subject: [PATCH] usbredirect: listen on correct address
|
||||||
|
|
||||||
|
Previously, usbredirect would ignore the listen address passed via
|
||||||
|
`--as <addr>:<port>`, and would always listen on the loopback interface.
|
||||||
|
This corrects that behavior.
|
||||||
|
|
||||||
|
Signed-off-by: Daniel Fullmer <danielrf12@gmail.com>
|
||||||
|
---
|
||||||
|
tools/usbredirect.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/usbredirect.c b/tools/usbredirect.c
|
||||||
|
index 5e2376c..ff910ab 100644
|
||||||
|
--- a/tools/usbredirect.c
|
||||||
|
+++ b/tools/usbredirect.c
|
||||||
|
@@ -567,7 +567,12 @@ main(int argc, char *argv[])
|
||||||
|
GSocketService *socket_service;
|
||||||
|
|
||||||
|
socket_service = g_socket_service_new ();
|
||||||
|
- GInetAddress *iaddr = g_inet_address_new_loopback(G_SOCKET_FAMILY_IPV4);
|
||||||
|
+ GInetAddress *iaddr = g_inet_address_new_from_string(self->addr);
|
||||||
|
+ if (iaddr == NULL) {
|
||||||
|
+ g_warning("Failed to parse IP: %s", self->addr);
|
||||||
|
+ goto end;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
GSocketAddress *saddr = g_inet_socket_address_new(iaddr, self->port);
|
||||||
|
g_object_unref(iaddr);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.0.windows.1
|
||||||
@ -1,12 +1,14 @@
|
|||||||
Name: usbredir
|
Name: usbredir
|
||||||
Version: 0.12.0
|
Version: 0.12.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: network protocol libraries for sending USB device traffic
|
Summary: network protocol libraries for sending USB device traffic
|
||||||
License: LGPLv2+ and GPLv2+
|
License: LGPLv2+ and GPLv2+
|
||||||
URL: https://www.spice-space.org/usbredir.html
|
URL: https://www.spice-space.org/usbredir.html
|
||||||
|
|
||||||
Source0: http://spice-space.org/download/%{name}/%{name}-%{version}.tar.xz
|
Source0: http://spice-space.org/download/%{name}/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch1: 0001-usbredirect-listen-on-correct-address.patch
|
||||||
|
|
||||||
BuildRequires: libusb1-devel >= 1.0.9 gcc
|
BuildRequires: libusb1-devel >= 1.0.9 gcc
|
||||||
BuildRequires: meson glib2-devel
|
BuildRequires: meson glib2-devel
|
||||||
Provides: %{name}-server
|
Provides: %{name}-server
|
||||||
@ -68,6 +70,9 @@ This contains man files for the using of usbredir.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 1 2022 lihaoxiang <lihaoxiang9@huawei.com> - 0.12.0-3
|
||||||
|
- usbredirect: listen on correct address
|
||||||
|
|
||||||
* Thu Jan 20 2022 yanglongkang <yanglongkang@huawei.com> - 0.12.0-2
|
* Thu Jan 20 2022 yanglongkang <yanglongkang@huawei.com> - 0.12.0-2
|
||||||
- modify the %files in spec file
|
- modify the %files in spec file
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user