diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-03 20:53:46 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-05-03 20:53:46 +0000 |
commit | c904d61f78479b46a154273960e5f4e2b22d6b55 (patch) | |
tree | 84deb5c52df749b1b40403730e3a42475433ab86 | |
parent | 215cf0bed85ea55efbc53306e092c4780bf4933c (diff) |
UDP broadcast translation error (Mark Jonckheere)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1899 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | slirp/udp.c | 5 |
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; |