From 95623e353bc09981c438ba53d863ffd572ddf85e Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 8 Nov 2013 15:52:07 +0000 Subject: [ipv6] Use given source address only if it is not the unspecified address Signed-off-by: Michael Brown --- src/net/ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net') diff --git a/src/net/ipv6.c b/src/net/ipv6.c index 8279f0587..abe993d0f 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 ) ); -- cgit v1.2.3-55-g7522