UDP broadcast translation error (Mark Jonckheere)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1899 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-05-03 20:53:46 +00:00
parent 215cf0bed8
commit c904d61f78

View File

@ -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;