bugzilla-daemon at netfilter.org
2017-Mar-17 23:16 UTC
[Bug 1132] New: Maps and Dictionaries need catch-all ('default:' 'else') case for when no entry matches.
https://bugzilla.netfilter.org/show_bug.cgi?id=1132 Bug ID: 1132 Summary: Maps and Dictionaries need catch-all ('default:' 'else') case for when no entry matches. Product: nftables Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: kernel Assignee: pablo at netfilter.org Reporter: rwhite at pobox.com It would be extremely helpful if the various look-up cases had the option of including a default value or verdict to return or execute (respectively) when no entry matches. This doesn't really make sense for plain sets where membership is what's being tested, but for the branch-like implicit in mapping it's 'very hard' to create some kinds of 'else' branch. So like... table ip example { map server { type inet_service : ipv4_addr flags interval, default default = 172.18.0.2 elements = { 9994 : 172.18.0.5} } } Default is, obviously just an the result data type with none of the key parts so it's not really part of the elements = {} part. using elements = { default: 17.18.0.2 } is too complicated since something could be named "default" in whatever lookup NSS is in force (e.g. "echo default 4455/tcp >> /etc/services" would damage other syntax choices). So best to add it as a keyword. I'd put it in the flags to make it explicit and so prevent brain damage. -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170317/59ef09b4/attachment.html>
Possibly Parallel Threads
- [Bug 1134] New: snat and dnat should accept mapping concatenated values for address and port
- [Bug 1137] New: Element "flow tables" should not be syntactically unique...
- [Bug 1282] New: SIGSEGV on loading tables
- [Bug 1265] New: Creating named sets concatenating ifname and anything else does not work
- [Bug 1425] New: th not accepted in snat with multiple ip protocols