summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slirp/udp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/slirp/udp.c b/slirp/udp.c
index dbccccc4fb..0d70970270 100644
--- a/slirp/udp.c
+++ b/slirp/udp.c
@@ -312,8 +312,11 @@ int udp_output(struct socket *so, struct mbuf *m,
struct sockaddr_in saddr, daddr;
saddr = *addr;
- if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr)
+ if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) {
saddr.sin_addr.s_addr = so->so_faddr.s_addr;
+ if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff))
+ saddr.sin_addr.s_addr = alias_addr.s_addr;
+ }
daddr.sin_addr = so->so_laddr;
daddr.sin_port = so->so_lport;