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



Reply via email to