mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 01:21:45 +00:00
[ethernet] Add support for generating multicast hash for IPv6 addresses
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
0b65c8cad6
commit
0f787df284
@ -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[5] = net_addr_bytes[3];
|
||||
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:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user