Hello!
On 3/22/19 1:29 PM, remco van mook wrote:
Ideally I’d like to replace a statement like
print "REJECTING: ",net.ip,"/",net.len," received from ",from," AS ",bgp_path.first,": Prefix is a martian";
with
syslog LOG_WARNING, "REJECTING: ",net.ip,"/",net.len," received from ",from," AS ",bgp_path.first,": Prefix is a martian”;
Right now I’m just commenting out the print statements that get hit too often to prevent spamming log files with ten thousands of rows, and ideally I’d like to use the log command that Bird uses for it’s own messages to set where these messages should go based on relevance.
This seems feasible, based on the user point of view. What is worse, the print command itself is hacked into the filter language in quite a crude and insane way.
If it is enough for you, there is currently a fundamental filter rewrite undergoing code review and testing before being merged into v2 branch. After this is merged, it is possible to simplify the print command quite a lot and also to implement syslog. Is that enough for you?
I don't like implementing this in v1.6.x – the legacy branch will never get the new interpreter.