Concatenation + Interval => Broken Parser or Broken Concept

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems to be completely legal to declare a set or map with both a
concatenated type and an interval flag, but then it's apparently
impossible to actually install interval values in that set or map.

Example:
(Given)

table inet test {

        set addresses {
                type ipv4_addr
                flags interval
                elements = { 10.0.0.0/8, 172.16.0.0/12,
                             192.168.0.0/16 }
        }

        set tuple {
                type inet_service . ipv4_addr
                flags interval
        }
}

nft> add element inet test tuple { 80 . 10.0.0.0/8 }
Error: syntax error, unexpected /, expecting comma or '}'
add element inet test tuple { 80 . 10.0.0.0/8 }


One Would Expect that the set would be a concatenation of intervals, so
that every component in the add element command would be a legal
interval with at least one member.

That is all of the below _should_ be legal if expectations match "the
rule of least astonishment".

add element inet test tuple {
79 . 192,168.10.1,
80-88 . 192.168.11.3,
100 . 172.16.0.0/12,
1000-2000 . 10.0.0.0/8
}

But only the non-ranged (first) tuple will make it through the parser.

If concatenation and interval are not legal together then declaring such
a set/map/etc should produce a suitable error and diagnostic.

If concatenation and interval are legal then the parser (et. al.) needs
to accept the relevant data elements.

--
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



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux