slirp: Make udp_attach IPv6 compatible

A unsigned short is now passed in argument to udp_attach instead of using a
hardcoded "AF_INET" to call qemu_socket().

This prepares for IPv6 support.

Signed-off-by: Guillaume Subiron <maethor@subiron.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Guillaume Subiron 2015-12-19 22:25:02 +01:00 committed by Jason Wang
parent 8a87f121ca
commit 9b5a30dc41
3 changed files with 6 additions and 5 deletions

View file

@ -162,7 +162,7 @@ icmp_input(struct mbuf *m, int hlen)
if (icmp_send(so, m, hlen) == 0) {
return;
}
if(udp_attach(so) == -1) {
if (udp_attach(so, AF_INET) == -1) {
DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n",
errno,strerror(errno)));
sofree(so);