Template sans "channels"
Ahoj (again) :-) While in the process of cleaning up "ancient" configs (basically rewriting them from scratch) I came across an odd discovery: A template definition (for a kernel protocol) demands the specification of one (and only one) channel - which, in my case, defeats the whole purpose of having a kernel template in the first place. I attempted to have a template with all the "standard behaviour" I wanted (persist, metric, table #, ...) for both IPv6 and legacy-IPv4 kernel tables and then tried to apply it like so: template kernel KERNEL { persist; learn; metric 20; kernel table 10; } protocol kernel KERNEL6 from KERNEL { ipv6; } protocol kernel KERNEL4 from KERNEL { ipv4; } ... because I thought the templating mechanism was "just" some syntactic sugar, similar to an "include" statement?! As the kernel template demands a (single) channel statement, which could then, upon invocation, not be "negated" again, i.e., by a no ipv4; statement I can only have two templates - one pre-destined for IPv6 and another for IPv4. What is the intention behind this? I do understand, that -in the end- the actual protocol defined through a template must have one (and only one in the case of a "kernel" protocol) channel definition and in my example this requirement would be fulfilled. Thoughts? Hints? Thanks again - Clemens
On Thu, Jan 09, 2020 at 03:20:23PM +0100, Clemens Schrimpe wrote:
Ahoj (again) :-)
While in the process of cleaning up "ancient" configs (basically rewriting them from scratch) I came across an odd discovery:
A template definition (for a kernel protocol) demands the specification of one (and only one) channel - which, in my case, defeats the whole purpose of having a kernel template in the first place. ... What is the intention behind this? I do understand, that -in the end- the actual protocol defined through a template must have one (and only one in the case of a "kernel" protocol) channel definition and in my example this requirement would be fulfilled.
Hello Seems like a bug. Will check that. -- 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."
On Thu, Jan 09, 2020 at 03:20:23PM +0100, Clemens Schrimpe wrote:
Ahoj (again) :-)
While in the process of cleaning up "ancient" configs (basically rewriting them from scratch) I came across an odd discovery:
A template definition (for a kernel protocol) demands the specification of one (and only one) channel - which, in my case, defeats the whole purpose of having a kernel template in the first place.
What is the intention behind this? I do understand, that -in the end- the actual protocol defined through a template must have one (and only one in the case of a "kernel" protocol) channel definition and in my example this requirement would be fulfilled.
Hello (Noticed while looking for some missed / forgotten e-mails) Thanks, fixed: https://gitlab.nic.cz/labs/bird/-/commit/2a8cc7259e236773f1b8423ef63305a5b8b... -- 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."
participants (2)
-
Clemens Schrimpe -
Ondrej Zajicek