Hello, I am trying to use prefix-set inside a filter in IPv6: filter my_filter6 prefix set my_prefixset6; { my_prefixset6 = [aaaa:bbbb:100:ff::/56]; if (net ~ my_prefixset6) then { bgp_local_pref = 104; } accept; } But I get the following error: birdc6 BIRD 1.6.3 ready. bird> configure check Invalid network prefix: aaaa:bbbb:100:ff::/56. Am I doing anything wrong ? Also, the prefix set is dynamically updated via script, is there a correct way to handle the case where it is empty ? Or should the scripts comment the definition of prefix-set and the complete "if" block ? Regards, -- Damien Clabaut R&D vRouter ovh.qc.ca
Hello again, After checking the code I answered my first question, leaving the solution here: Bird returns an error if you define anything else than 0 after the network mask. aaaa:bbbb:0100:00ff:: defines 64 bits, so you cannot set a mask bigger than 64. Though it is not standard behaviour, it is understandable. Remains my second question, how can I handle the case where the prefix-set is empty ? Regards, On 15/08/17 10:33 AM, Damien Clabaut wrote:
Hello,
I am trying to use prefix-set inside a filter in IPv6:
filter my_filter6 prefix set my_prefixset6; { my_prefixset6 = [aaaa:bbbb:100:ff::/56]; if (net ~ my_prefixset6) then { bgp_local_pref = 104; }
accept;
}
But I get the following error:
birdc6 BIRD 1.6.3 ready. bird> configure check
Invalid network prefix: aaaa:bbbb:100:ff::/56.
Am I doing anything wrong ?
Also, the prefix set is dynamically updated via script, is there a correct way to handle the case where it is empty ?
Or should the scripts comment the definition of prefix-set and the complete "if" block ?
Regards,
-- Damien Clabaut R&D vRouter ovh.qc.ca
On Tue, Aug 15, 2017 at 11:41:22AM -0400, Damien Clabaut wrote:
Hello again,
Remains my second question, how can I handle the case where the prefix-set is empty ?
No, that is not possible. BIRD needs an item in set to see which kind of set it is (prefix set, ip set, number set ...). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Anno domini 2017 Ondrej Zajicek scripsit:
On Tue, Aug 15, 2017 at 11:41:22AM -0400, Damien Clabaut wrote:
Hi,
Remains my second question, how can I handle the case where the prefix-set is empty ?
No, that is not possible. BIRD needs an item in set to see which kind of set it is (prefix set, ip set, number set ...).
As this already bit me once, too: Is there any way to "fix" this, so that an empty set is OK? :-) Best Max -- The real problem with C++ for kernel modules is: the language just sucks. -- Linus Torvalds
participants (3)
-
Damien Clabaut -
Maximilian Wilhelm -
Ondrej Zajicek