Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion api/v1/app/utils/path_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ def process_path_data(
print(f"Hopcount: {hopcount}, Algo: {algo}")

# Extract SID locators filtered by algo
# Skip the first node (source) as we only need intermediate + destination SIDs
locators = []
for node in path_data:
for node in path_data[1:]:
# print(f"Processing node: {json.dumps(node, indent=2)}")
# Check for vertex and sids in the vertex object
if 'vertex' in node and 'sids' in node['vertex']:
Expand All @@ -44,6 +45,11 @@ def process_path_data(
sid_entry['srv6_endpoint_behavior']['algo'] == algo):
matching_sid = sid_entry.get('srv6_sid')
break
# Also accept SIDs without endpoint behavior (e.g., host endpoints)
# These are algo-agnostic and should be included regardless
elif 'srv6_endpoint_behavior' not in sid_entry and matching_sid is None:
matching_sid = sid_entry.get('srv6_sid')
# Don't break - keep looking for an algo-specific SID

# If we found a matching SID, add it to locators
if matching_sid:
Expand Down
4 changes: 1 addition & 3 deletions install/collectors/telegraf-ingress/telegraf_ingress_dp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ spec:
spec:
containers:
- name: telegraf
image: telegraf:1.15-alpine
image: telegraf:1.30.0-alpine
volumeMounts:
- mountPath: /etc/telegraf/telegraf.conf
name: telegraf-ingress-config
subPath: telegraf.conf
readOnly: true
imagePullSecrets:
- name: regcred
volumes:
- name: telegraf-ingress-config
configMap:
Expand Down
4 changes: 1 addition & 3 deletions install/processors/telegraf-egress/telegraf_egress_dp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ spec:
spec:
containers:
- name: telegraf
image: telegraf:1.15-alpine
image: telegraf:1.30.0-alpine
volumeMounts:
- mountPath: /etc/telegraf/telegraf.conf
name: telegraf-egress-config
subPath: telegraf.conf
readOnly: true
imagePullSecrets:
- name: regcred
volumes:
- name: telegraf-egress-config
configMap:
Expand Down
25 changes: 25 additions & 0 deletions ip-graph/arangodb/bgp-prefix-processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ func (uc *UpdateCoordinator) processPrefixAdvertisement(ctx context.Context, key
glog.Infof("Processing %s BGP prefix: %s/%d from AS%d via AS%d (key: %s)",
prefixType, prefix, prefixLen, originAS, peerASN, consistentKey)

// Skip /32 and /128 host routes from external eBGP neighbors
// These are typically loopbacks that create incorrect topology when re-advertised
// Only process them if they originate from internal IGP network
if prefixLen == 32 || prefixLen == 128 {
isIGPOrigin, err := uc.checkIfIGPOrigin(ctx, originAS)
if err != nil {
glog.Warningf("Failed to check IGP origin for %s/%d: %v", prefix, prefixLen, err)
}
if !isIGPOrigin {
glog.V(6).Infof("Skipping external eBGP host route %s/%d from AS%d (loopback re-advertisement)", prefix, prefixLen, originAS)
return nil
}
glog.V(6).Infof("Processing internal IGP host route %s/%d from AS%d", prefix, prefixLen, originAS)
}

// All prefixes create proper vertices (including internal /32 and /128 loopbacks)
// All prefixes create proper vertices (including /32 and /128 loopbacks)
return uc.createBGPPrefixVertex(ctx, consistentKey, prefixData, prefixType, isIPv4)
}
Expand Down Expand Up @@ -477,6 +493,15 @@ func (uc *UpdateCoordinator) findBGPPeerNodesForPrefix(ctx context.Context, orig
return uc.findIGPNodesForPrefix(ctx, originAS, prefixData)
}

// Skip /32 and /128 host routes from external eBGP neighbors
// These are typically loopbacks that get re-advertised through the network
// Creating edges for every peer that received them creates incorrect topology
// (matches the deduplication processor logic: FILTER u.prefix_len < 30)
if (prefixLen == 32) || (prefixLen == 128) {
glog.V(6).Infof("Skipping external eBGP host route %s/%d from AS%d (loopback re-advertisement)", prefix, prefixLen, originAS)
return nil, nil
}

// For external prefixes, use peer-centric approach
glog.V(7).Infof("Prefix %s/%d is external (origin AS: %d) - attaching to advertising BGP peer", prefix, prefixLen, originAS)
return uc.findAdvertisingBGPPeer(ctx, prefix, prefixLen, originAS, peerASN, prefixData)
Expand Down
Loading