소스 검색

[ethernet] Add support for generating multicast hash for IPv6 addresses

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 년 전
부모
커밋
0f787df284
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      src/net/ethernet.c

+ 5
- 0
src/net/ethernet.c 파일 보기

@@ -149,6 +149,11 @@ int eth_mc_hash ( unsigned int af, const void *net_addr, void *ll_addr ) {
149 149
 		ll_addr_bytes[4] = net_addr_bytes[2];
150 150
 		ll_addr_bytes[5] = net_addr_bytes[3];
151 151
 		return 0;
152
+	case AF_INET6:
153
+		ll_addr_bytes[0] = 0x33;
154
+		ll_addr_bytes[1] = 0x33;
155
+		memcpy ( &ll_addr_bytes[2], &net_addr_bytes[12], 4 );
156
+		return 0;
152 157
 	default:
153 158
 		return -ENOTSUP;
154 159
 	}

Loading…
취소
저장