slirp: Fix port comparision in slirp_remove_hostfwd
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 24 Jun 2009 12:42:28 +0000 (14:42 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Jun 2009 13:52:45 +0000 (08:52 -0500)
commit4943edac44ef6da008a5600e753ff5b6f095bbaf
tree40bb9e99f838c248e941642b4fd970fbb5db3263
parent8ed2d5b9881bf2f18141bfbf341f5a8908cd8238
slirp: Fix port comparision in slirp_remove_hostfwd

For UDP host forwardings, fport is not stable, every outgoing packet of
the redirection can modify it. Use getsockname instead to look up the
port that is actually used on the host side.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp/slirp.c