Closed mrimann closed 8 months ago
Hi @job - thanks for the quick response!
Of course, it's an incomplete example, maybe this should be stated somewhere. But the filter function alone was not explaining it enough for me, that's why I tried to give more context by embedding / calling it from a BGP config block (as just adding the function alone would not help at all).
We could try to turn it around to something like:
function filter_import_v4()
{
# do not accept too short prefixes
if (net.len > 24) then {
print "Reject: Too small prefix: ", net, " ", bgp_path;
reject;
}
# TODO: add all other filtering needed.
# accecpt any other routes
else accept;
}
# include the filter in each BGP session (separate for v4 and v6)
protocol bgp NAME {
(...)
ipv4 {
# perform some filtering on received routes
import filter filter_import_v4;
}
}
Would that make it more clear that more filter rules are needed + at the same time show where to embed the filtering particular for this example?
@job I'm curious whether my proposal is "wrong" or not OK - or if it's just a "no time to review" situation. Any update would be appreciated!
sorry! Lost track of this one :)
Thanks @job - no problem! Just thought I could once in a while ask for an update :-) Thanks for reviewing/merging!
Wouldn't this approach cause all other prefixes (regardless of validity) to be accepted? For example if a prefix is not small, but does contain a bogon ASN somewhere in the AS_PATH