From: Igor Putovny Date: Wed, 12 Feb 2025 16:17:56 +0000 (+0100) Subject: Add shift values for ipa bit operations X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=166df9bdf1a6dfbad90d2566dd26e915a701bf1d;p=thirdparty%2Fbird.git Add shift values for ipa bit operations --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 8d95a1be9..acbb7ac35 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -97,6 +97,11 @@ static const char *px_origin_str[] = { [AGGREGATED] = "aggregated", }; +static const u32 ipa_shift[] = { + [NET_IP4] = IP6_MAX_PREFIX_LENGTH - IP4_MAX_PREFIX_LENGTH, + [NET_IP6] = 0, +}; + static inline int is_leaf(const struct trie_node *node) {