Fix slirp udp source address contamination (Jason Wessel)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4259 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ce1f4520ff
commit
4a0d8278ca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user