Commit f0e3ac70 authored by Lei Li's avatar Lei Li Committed by Stefan Hajnoczi
Browse files

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: default avatarLei Li <lilei@linux.vnet.ibm.com>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent e5b8b0d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }