feat(trunk): warn when ROUTABLE_PREFIXES='*' set on a multi-trunk reflector

This commit is contained in:
Audric committed 2026-06-15 18:33:07 +02:00
1 parent 92c8284b7c
commit bf7c82b3ae
2 files changed
+19

No files matched your search

+18
View File
@@ -2407,6 +2407,24 @@ void Reflector::initTrunkLinks(void)
}
}
// A "*" routable route on a node with >1 trunk is outside the intended
// regional-leaf pattern: "*" only affects this node's own local clients and
// is never transited (loop guard, spec section 5). Warn so it reads as
// likely misconfig.
if (m_trunk_links.size() > 1)
{
for (auto* l : m_trunk_links)
{
if (l->hasRoutableWildcard())
{
geulog::warn("trunk", l->section(),
": ROUTABLE_PREFIXES contains '*' on a multi-trunk reflector — "
"'*' affects only local clients and is never relayed between "
"trunks. Intended for single-uplink regional leaves.");
}
}
}
// Validate cluster TGs don't overlap with any prefix
for (uint32_t tg : m_cluster_tgs)
{
+1
View File
@@ -138,6 +138,7 @@ class TrunkLink : public sigc::trackable
static const time_t PEER_INTEREST_TIMEOUT_S = 600;
bool isPaired(void) const { return m_paired; }
bool hasRoutableWildcard(void) const { return m_routable_wildcard; }
bool hasInboundConnection(void) const
{
return m_paired ? !m_ib_cons.empty() : (m_inbound_con != nullptr);