Remove debug logging for withdrawals without origin ASN
This commit is contained in:
parent
3c46087976
commit
eda90d96a9
@ -111,11 +111,11 @@ func (h *PrefixHandler) HandleMessage(msg *ristypes.RISMessage) {
|
|||||||
for _, prefix := range msg.Withdrawals {
|
for _, prefix := range msg.Withdrawals {
|
||||||
h.batch = append(h.batch, prefixUpdate{
|
h.batch = append(h.batch, prefixUpdate{
|
||||||
prefix: prefix,
|
prefix: prefix,
|
||||||
originASN: 0, // No origin for withdrawals
|
originASN: originASN, // Use the originASN from path if available
|
||||||
peer: msg.Peer,
|
peer: msg.Peer,
|
||||||
messageType: "withdrawal",
|
messageType: "withdrawal",
|
||||||
timestamp: timestamp,
|
timestamp: timestamp,
|
||||||
path: nil,
|
path: msg.Path,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,13 +255,16 @@ func (h *PrefixHandler) processWithdrawal(_ *database.Prefix, update prefixUpdat
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If no origin ASN, log a warning
|
// If no origin ASN, just delete all routes for this prefix from this peer
|
||||||
h.logger.Warn("Withdrawal without origin ASN",
|
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,
|
"prefix", update.prefix,
|
||||||
"peer", update.peer,
|
"peer", update.peer,
|
||||||
|
"error", err,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Stop gracefully stops the handler and flushes remaining batches
|
// Stop gracefully stops the handler and flushes remaining batches
|
||||||
func (h *PrefixHandler) Stop() {
|
func (h *PrefixHandler) Stop() {
|
||||||
|
Loading…
Reference in New Issue
Block a user