summaryrefslogtreecommitdiffstats
path: root/src/parser.y
Commit message (Collapse)AuthorAgeFilesLines
* cmd/netlink: make sure we always have a location in netlink operationsPatrick McHardy2013-04-181-24/+24
| | | | | | Improve error reporting by always using a location in netlink operations. Signed-off-by: Patrick McHardy<kaber@trash.net>
* rule: allow to list of existing tablesPablo Neira Ayuso2013-04-181-2/+15
| | | | | | | | You can now specify: nft list tables ip to obtain the list of all existing tables. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* rule: add rule insertion (prepend) supportPatrick McHardy2012-12-141-2/+10
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* chains: add chain rename supportPatrick McHardy2012-12-141-3/+12
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: fix parsing protocol names for protocols which are also keywordsPatrick McHardy2012-12-051-0/+63
| | | | | | "ip protocol tcp" will currently produce a syntax error since tcp is also a keyword which is expected ot be followed by a tcp header field. Allow to use protocol names that are also keywords and allocate a constant expression for them.
* netlink: fix creation of base chains with hooknum and priority 0Patrick McHardy2010-07-061-0/+2
| | | | | | | | Base chains with both a hook number and priority of zero are created as regular chains. Fix by adding a BASECHAIN flag indicating that the chain should be created as a base chain. Signed-off-by: Patrick McHardy <kaber@trash.net>
* debug: properly parse debug levelsPatrick McHardy2010-07-061-3/+5
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: support bison >= 2.4Patrick McHardy2010-07-061-1/+19
| | | | | | | | | Work around stange behaviour in bison >= 2.4 (see large comment in parser.y for details) and remove the skeleton file since it does not work with 2.4 anymore. Its only purpose was to increase the amount of possible tokens reported in error messages anyways. Signed-off-by: Patrick McHardy <kaber@trash.net>
* payload: add DCCP packet type definitionsPatrick McHardy2009-07-281-0/+1
| | | | | | | | | | | | | | | | | | | # nft describe dccp type payload expression, datatype dccp_pkttype (DCCP packet type) (basetype integer), 4 bits pre-defined symbolic constants: request 0x0 response 0x1 data 0x2 ack 0x3 dataack 0x4 closereq 0x5 close 0x6 reset 0x7 sync 0x8 syncack 0x9 Signed-off-by: Patrick McHardy <kaber@trash.net>
* add support for new set API and standalone setsPatrick McHardy2009-07-281-98/+193
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* ct: resync netlink header and properly add ct l3protocol supportPatrick McHardy2009-03-311-2/+4
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Fix some memory leaksPatrick McHardy2009-03-201-0/+1
| | | | | | Free nested chain handles and command structures when done. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add support for user-defined symbolic constantsPatrick McHardy2009-03-201-7/+20
| | | | | | | | | | | | | | | | | | User-defined constants can be used like this: define allowed_hosts = { 192.168.0.0/24, 10.0.0.20-10.0.0.30 } define udp_services = domain define tcp_services = { ssh, domain } ip saddr $allowed_hosts udp dport $udp_services counter accept ip saddr $allowed_hosts tcp dport $tcp_services counter accept Recursive definitions are possible, but currently not fully handled. Anything requiring transformations (sets using ranges) can not be used more than once currently since the expressions need to be COW'ed previously. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add support for scoping and symbol bindingPatrick McHardy2009-03-201-2/+30
| | | | | | | | | | | | As a first step towards stand-alone sets, add support for scoping and binding symbols. This will be used for user-defined constants, as well as declarations of modifiable (stand-alone) sets once the kernel side is ready. Scopes are currently limited to three nesting levels: the global scope, table block scopes and chain block scopes. Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: consistently use $@ for location of entire groupingPatrick McHardy2009-03-201-15/+15
| | | | | | Replace use of specific location references for single-element rules. Signed-off-by: Patrick McHardy <kaber@trash.net>
* parser: fix common_block usage in chain and table blocksPatrick McHardy2009-03-201-2/+2
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Allow newlines in regular mapsPatrick McHardy2009-03-181-3/+5
| | | | | | The previous patch only handled sets and verdict maps. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Allow newlines in sets and mapsPatrick McHardy2009-03-181-11/+29
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* Initial commitv0.01-alpha1Patrick McHardy2009-03-181-0/+1386