Skip to content

Commit

Permalink
[ethernet] Add support for generating multicast hash for IPv6 addresses
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Sep 3, 2013
1 parent 0b65c8c commit 0f787df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/net/ethernet.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0f787df

Please sign in to comment.