diff options
author | Lei Li <lilei@linux.vnet.ibm.com> | 2012-11-01 17:39:55 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2012-11-01 11:00:59 +0100 |
commit | f0e3ac70341febed02591b61b579723279783053 (patch) | |
tree | a52f02686d87c16774e6a1dd737dc9f686d609e1 | |
parent | e5b8b0d4ba29fe1268ba049519a1b0cf8552a21a (diff) |
net: use "socket" model name for UDP sockets
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>
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index b75d567695..c01323d4b0 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; } |