Reject log message; bgp_community comparaison
Arnaud Fenioux
afenioux at franceix.net
Thu Jan 29 10:03:23 CET 2015
Thank you Chris and Mikhail for your answers
It’s working fine :)
Arnaud
> On 28 Jan 2015, at 19:25, Chris Caputo <ccaputo at alt.net> wrote:
>
> On Wed, 28 Jan 2015, Arnaud Fenioux wrote:
>> Hello the bird community,
>>
>> I've two small questions, I've put them in the same mail even if they are not related :
>>
>> 1/ I currently use this code in my config to reject “martians”
>>
>> if ( is_martian() ) then {
>> reject "prefix rejected by is_martian";
>> }
>>
>> Which prints in logs : <INFO> prefix rejected by is_martian
>> Do you know if there is a way to add some variables in the log (like bgp_path.first, from or net) ?
>
> Yes, for example in a function called rt_import_all, I use:
>
> if net_martian() then
> {
> print "rt_import_all: ", net, " from ", from, ": net_martian() returned true!";
> return false;
> }
>
> so I imagine you could do:
>
> if ( is_martian() ) then {
> reject "prefix rejected by is_martian: ", net, " from ", from, " bgp_path.first ", bgp_path.first;
> }
>
> Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150129/85cb4fe1/attachment.asc>
More information about the Bird-users
mailing list