Remove debug logging for withdrawals without origin ASN
This commit is contained in:
parent
3c46087976
commit
eda90d96a9
@ -46,7 +46,7 @@ func New() (*Config, error) {
|
||||
return &Config{
|
||||
StateDir: stateDir,
|
||||
MaxRuntime: 0, // Run forever by default
|
||||
EnableBatchedDatabaseWrites: true, // Enable batching by default
|
||||
EnableBatchedDatabaseWrites: true, // Enable batching by default
|
||||
RouteExpirationTimeout: defaultRouteExpirationMinutes * time.Minute, // For active route monitoring
|
||||
}, nil
|
||||
}
|
||||
|
@ -111,11 +111,11 @@ func (h *PrefixHandler) HandleMessage(msg *ristypes.RISMessage) {
|
||||
for _, prefix := range msg.Withdrawals {
|
||||
h.batch = append(h.batch, prefixUpdate{
|
||||
prefix: prefix,
|
||||
originASN: 0, // No origin for withdrawals
|
||||
originASN: originASN, // Use the originASN from path if available
|
||||
peer: msg.Peer,
|
||||
messageType: "withdrawal",
|
||||
timestamp: timestamp,
|
||||
path: nil,
|
||||
path: msg.Path,
|
||||
})
|
||||
}
|
||||
|
||||
@ -255,11 +255,14 @@ func (h *PrefixHandler) processWithdrawal(_ *database.Prefix, update prefixUpdat
|
||||
)
|
||||
}
|
||||
} else {
|
||||
// If no origin ASN, log a warning
|
||||
h.logger.Warn("Withdrawal without origin ASN",
|
||||
"prefix", update.prefix,
|
||||
"peer", update.peer,
|
||||
)
|
||||
// If no origin ASN, just delete all routes for this prefix from this peer
|
||||
if err := h.db.DeleteLiveRoute(update.prefix, 0, update.peer); err != nil {
|
||||
h.logger.Error("Failed to delete live route (no origin ASN)",
|
||||
"prefix", update.prefix,
|
||||
"peer", update.peer,
|
||||
"error", err,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user