aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-11-08 15:52:07 +0000
committerMichael Brown <mcb30@ipxe.org>2013-11-14 12:35:43 +0000
commit95623e353bc09981c438ba53d863ffd572ddf85e (patch)
tree81fd99730bcd46236ae6574aa6fa50ad96229ffd /src/net
parent4484edd1c0bd4f62c75f0db517e2747039816e4c (diff)
downloadipxe-95623e353bc09981c438ba53d863ffd572ddf85e.zip
ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.gz
ipxe-95623e353bc09981c438ba53d863ffd572ddf85e.tar.bz2
[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')
-rw-r--r--src/net/ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index 8279f05..abe993d 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 ) );