Patchwork [2/4] net: use "socket" model name for UDP sockets

login
register
mail settings
Submitter Stefan Hajnoczi
Date Nov. 1, 2012, 11:10 a.m.
Message ID <1351768218-21466-3-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/196162/
State New
Headers show

Comments

Stefan Hajnoczi - Nov. 1, 2012, 11:10 a.m.
From: Lei Li <lilei@linux.vnet.ibm.com>

Fix the problem that can not delete the udp socket.
It's caused by passing "udp" model to net_socket_udp_init,
but we do not have "udp" model in our model list.
Pass the right model "socket" to init function.

https://bugs.launchpad.net/qemu/+bug/1073585?comments=all

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 net/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/net/socket.c b/net/socket.c
index b75d567..c01323d 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -747,7 +747,7 @@  int net_init_socket(const NetClientOptions *opts, const char *name,
         error_report("localaddr= is mandatory with udp=");
         return -1;
     }
-    if (net_socket_udp_init(peer, "udp", name, sock->udp, sock->localaddr) ==
+    if (net_socket_udp_init(peer, "socket", name, sock->udp, sock->localaddr) ==
         -1) {
         return -1;
     }