diff options
author | Arturo Borrero Gonzalez <arturo@netfilter.org> | 2018-02-25 18:30:24 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-02-25 23:09:02 +0100 |
commit | 8c61fa70f3cebed06b23292a3467f1dbc1b96ce9 (patch) | |
tree | 46f4550c256a590094c0e732077675d40a73051a /src/datatype.c | |
parent | ba00c6b18ee2bf3bc100226ecc2e6bfd779eb482 (diff) |
meta: introduce datatype ifname_type
This new datatype is a string subtype.
It will allow us to build named maps/sets using meta keys like 'iifname',
'oifname', 'ibriport' or 'obriport'.
Example:
table inet t {
set s {
type ifname
elements = { "eth0",
"eth1" }
}
chain c {
iifname @s accept
oifname @s accept
}
}
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/datatype.c')
-rw-r--r-- | src/datatype.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/datatype.c b/src/datatype.c index 93726caf..324ac802 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -68,6 +68,7 @@ static const struct datatype *datatypes[TYPE_MAX + 1] = { [TYPE_ECN] = &ecn_type, [TYPE_FIB_ADDR] = &fib_addr_type, [TYPE_BOOLEAN] = &boolean_type, + [TYPE_IFNAME] = &ifname_type, }; const struct datatype *datatype_lookup(enum datatypes type) |