-#define IP6_MFIB_MK_KEY_MASK(_grp, _src, _len, _key) \
-{ \
- IP6_MFIB_MK_KEY(_grp, _src, _key); \
- \
- (_key)->mask[0] = 33; \
- if (_len <= 128) \
- { \
- memcpy((_key)->mask+1, &ip6_main.fib_masks[_len], 16); \
- memset((_key)->mask+17, 0, 16); \
- } \
- else \
- { \
- ASSERT(_len == 256); \
- memcpy((_key)->mask+1, &ip6_main.fib_masks[128], 16); \
- memcpy((_key)->mask+17, &ip6_main.fib_masks[128], 16); \
- } \
+#define IP6_MFIB_MK_KEY(_mfib, _grp, _src, _len, _key) \
+{ \
+ _key.key[0] = (_grp->as_u64[0] & \
+ ip6_main.fib_masks[IPV6_MFIB_GRP_LEN(_len)].as_u64[0]); \
+ _key.key[1] = (_grp->as_u64[1] & \
+ ip6_main.fib_masks[IPV6_MFIB_GRP_LEN(_len)].as_u64[1]); \
+ if (_len == 256) { \
+ _key.key[2] = _src->as_u64[0]; \
+ _key.key[3] = _src->as_u64[1]; \
+ } else { \
+ _key.key[2] = 0; \
+ _key.key[3] = 0; \
+ } \
+ _key.key[4] = _mfib->index; \
+ _key.key[4] = (_key.key[4] << 32) | len; \