mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 20:10:18 +03:00
[ipv6] Use given source address only if it is not the unspecified address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user