]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ipv6] Include network device when transcribing multicast addresses
authorMichael Brown <mcb30@ipxe.org>
Fri, 23 May 2014 12:36:35 +0000 (13:36 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 23 May 2014 13:11:17 +0000 (14:11 +0100)
Destination multicast addresses require a sin6_scope_id, which should
therefore be transcribed to a network device name by ipv6_sock_ntoa().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/ipv6.c

index f753751dfce11641d94adc38c74a162a29eccee9..771249403838621d289e68df39a454aa279e9055 100644 (file)
@@ -900,7 +900,7 @@ static const char * ipv6_sock_ntoa ( struct sockaddr *sa ) {
        const char *netdev_name;
 
        /* Identify network device, if applicable */
-       if ( IN6_IS_ADDR_LINKLOCAL ( in ) ) {
+       if ( IN6_IS_ADDR_LINKLOCAL ( in ) || IN6_IS_ADDR_MULTICAST ( in ) ) {
                netdev = find_netdev_by_index ( sin6->sin6_scope_id );
                netdev_name = ( netdev ? netdev->name : "UNKNOWN" );
        } else {