I have some very long (thousands of rules) rule chains, which I wish to
shorten by dispatching on part of the address.
Clearly, I can do something like -A FOO -s 2001:db8:1000/36 -j SUBCHAIN-81.
But in IPV6, the high order bits really aren't interesting.
The syntax -A FOO -s 001:c000::0/0f:f000:: (note the leading 1s in the
"netmask") seems to be accepted by iptables, and the rule appears with -L.
I would expect an address to be XORed with the -s address, ANDed with
the mask, and be true if 0. Even though this is an illegal mask for
routing, it's interesting for this.
Rather than experiment and rely on some undocumented behavior, I thought
I should ask:
Is this usage supported (in the sense that it will behave as described
and will continue to do so)? Or is this living dangerously?
Of course, it would be nice to have a chain type that didn't have
sequential evaluation semantics and just dispatched based on netmask and
address... but that's how things might be, not how they are...
(Why ridiculous chain lengths, you ask? Country blocking. But no
philosophical discussions about why this is a bad idea/easy to subvert,
please.)
Thanks.
--
---------------------------------------------------------
This communication may not represent my employer's views,
if any, on the matters discussed.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html