浏览代码

[ipv6] Include network device when transcribing multicast addresses

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>
tags/v1.20.1
Michael Brown 10 年前
父节点
当前提交
3a1adea036
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/net/ipv6.c

+ 1
- 1
src/net/ipv6.c 查看文件

@@ -900,7 +900,7 @@ static const char * ipv6_sock_ntoa ( struct sockaddr *sa ) {
900 900
 	const char *netdev_name;
901 901
 
902 902
 	/* Identify network device, if applicable */
903
-	if ( IN6_IS_ADDR_LINKLOCAL ( in ) ) {
903
+	if ( IN6_IS_ADDR_LINKLOCAL ( in ) || IN6_IS_ADDR_MULTICAST ( in ) ) {
904 904
 		netdev = find_netdev_by_index ( sin6->sin6_scope_id );
905 905
 		netdev_name = ( netdev ? netdev->name : "UNKNOWN" );
906 906
 	} else {

正在加载...
取消
保存