diff options
author | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2014-04-07 19:51:16 +0000 |
---|---|---|
committer | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2014-04-07 19:51:16 +0000 |
commit | b150313f898d0e86871d2d9cd2e3436e5a6abcfb (patch) | |
tree | ead16984fe5051dee8332ac4eb20ad2c0ff54053 /sys | |
parent | e9424d193f6f626d39a8482d1e33b7aa2703e86a (diff) |
In udp_output() also use the correct source address in case of an unbound socket.
OK claudio@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 070f9486380..09f1b3689f0 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.178 2014/04/07 10:04:17 mpi Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.179 2014/04/07 19:51:15 chrisz Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -1019,6 +1019,8 @@ udp_output(struct mbuf *m, ...) error = ENOTCONN; goto release; } + if (laddr.s_addr == INADDR_ANY) + laddr = inp->inp_laddr; } #ifdef IPSEC |