aboutsummaryrefslogtreecommitdiff
path: root/slirp/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/udp.c')
-rw-r--r--slirp/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/slirp/udp.c b/slirp/udp.c
index c48923b0c9..0dd7da6cde 100644
--- a/slirp/udp.c
+++ b/slirp/udp.c
@@ -318,7 +318,8 @@ 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 &&
+ addr->sin_addr.s_addr == htonl(0x7f000001)) {
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;