Commit c904d61f78479b46a154273960e5f4e2b22d6b55
1 parent
215cf0be
UDP broadcast translation error (Mark Jonckheere)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1899 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
slirp/udp.c
... | ... | @@ -312,8 +312,11 @@ int udp_output(struct socket *so, struct mbuf *m, |
312 | 312 | struct sockaddr_in saddr, daddr; |
313 | 313 | |
314 | 314 | saddr = *addr; |
315 | - if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) | |
315 | + if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { | |
316 | 316 | saddr.sin_addr.s_addr = so->so_faddr.s_addr; |
317 | + if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff)) | |
318 | + saddr.sin_addr.s_addr = alias_addr.s_addr; | |
319 | + } | |
317 | 320 | daddr.sin_addr = so->so_laddr; |
318 | 321 | daddr.sin_port = so->so_lport; |
319 | 322 | ... | ... |