return error instead of log

This commit is contained in:
Maycon Santos 2024-04-12 18:44:48 +02:00
parent bf0b6c5f8a
commit c4f17771e3

View File

@ -256,8 +256,7 @@ func addNonExistingRoute(prefix netip.Prefix, intf string) error {
return fmt.Errorf("exists in route table: %w", err)
}
if ok {
log.Warnf("Skipping adding a new route for network %s because it already exists", prefix)
return nil
return fmt.Errorf("Skipping adding a new route for network %s because it already exists", prefix)
}
ok, err = isSubRange(prefix)