]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ethernet] Add support for generating multicast hash for IPv6 addresses
authorMichael Brown <mcb30@ipxe.org>
Sat, 31 Aug 2013 02:23:24 +0000 (03:23 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 3 Sep 2013 01:02:51 +0000 (02:02 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/ethernet.c

index 013b2d76299013fa43526b8dbafd25a53f727fdf..a2e565899aad0fa1f9521c1d2283b9b52ff2a363 100644 (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[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;
        }