david/ipxe
Archived
1
0

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2013-08-31 03:23:24 +01:00
parent 0b65c8cad6
commit 0f787df284

View File

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