aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/ethernet.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-08-31 03:23:24 +0100
committerMichael Brown <mcb30@ipxe.org>2013-09-03 02:02:51 +0100
commit0f787df28446b5d9d3f139f414cfb38761c9ad09 (patch)
tree1e97499762030ff53ff14c2a40c47b0fb38b95ee /src/net/ethernet.c
parent0b65c8cad6ed1b03ce1870856b3496c7be1f8bf1 (diff)
downloadipxe-0f787df28446b5d9d3f139f414cfb38761c9ad09.tar.gz
[ethernet] Add support for generating multicast hash for IPv6 addresses
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ethernet.c')
-rw-r--r--src/net/ethernet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/ethernet.c b/src/net/ethernet.c
index 013b2d762..a2e565899 100644
--- a/src/net/ethernet.c
+++ b/src/net/ethernet.c
@@ -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;
}