Skip to contentSkip to conversation

net: fix bug in net_init_socket

PATCH Applied Lei Li 2 participants 3 messages Nov 1, 2012 – Nov 2, 2012

Subsystems (2)
lore
Share & tools
lore

Lei Li

author
#0 lore raw

PATCH 1/1 net: fix bug in net_init_socket

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

---
 net/socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/socket.c +1 -1
index b75d567..c01323d 100644
@@ -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;
     }
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 11 lines · Lei Li

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

---
 net/socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied to the net tree:
https://github.com/stefanha/qemu/commits/net

I changed the commit message from 'fix bug in net_init_socket' to 'use "socket" model name for UDP sockets' to be more specific.

Stefan

author
#2 lore raw
Quoted 12 lines · Stefan Hajnoczi
Quoted 11 lines · Lei Li

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

---
  net/socket.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 5 lines

Thanks, applied to the net tree:
https://github.com/stefanha/qemu/commits/net

I changed the commit message from 'fix bug in net_init_socket' to 'use "socket" model name for UDP sockets' to be more specific.

Sure, thanks. :)

Quoted 3 lines

Stefan

Signature · 1 line
Lei