diff options
author | Michael Brown | 2013-11-08 16:52:07 +0100 |
---|---|---|
committer | Michael Brown | 2013-11-14 13:35:43 +0100 |
commit | 95623e353bc09981c438ba53d863ffd572ddf85e (patch) | |
tree | 81fd99730bcd46236ae6574aa6fa50ad96229ffd /src/net/ipv6.c | |
parent | [settings] Move user-class setting from dhcp.c to settings.c (diff) | |
download | ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.gz ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.xz ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.zip |
[ipv6] Use given source address only if it is not the unspecified address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ipv6.c')
-rw-r--r-- | src/net/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c index 8279f058..abe993d0 100644 --- a/src/net/ipv6.c +++ b/src/net/ipv6.c @@ -399,7 +399,7 @@ static int ipv6_tx ( struct io_buffer *iobuf, rc = -ENETUNREACH; goto err; } - if ( sin6_src ) + if ( sin6_src && ! IN6_IS_ADDR_UNSPECIFIED ( &sin6_src->sin6_addr ) ) src = &sin6_src->sin6_addr; memcpy ( &iphdr->src, src, sizeof ( iphdr->src ) ); |