Browse Source

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
0f787df284
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      src/net/ethernet.c

+ 5
- 0
src/net/ethernet.c View File

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

Loading…
Cancel
Save