summaryrefslogtreecommitdiff
path: root/slirp/udp.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-03 20:53:46 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-05-03 20:53:46 +0000
commitc904d61f78479b46a154273960e5f4e2b22d6b55 (patch)
tree84deb5c52df749b1b40403730e3a42475433ab86 /slirp/udp.c
parent215cf0bed85ea55efbc53306e092c4780bf4933c (diff)
UDP broadcast translation error (Mark Jonckheere)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1899 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'slirp/udp.c')
-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;