diff options
author | Lukas Wunner <lukas@wunner.de> | 2020-03-11 13:20:06 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-10-28 02:01:25 +0200 |
commit | 510c4fad7e78f9350f492463d68899a6154807d3 (patch) | |
tree | 42057f190379a7a2c2501977957f1cb6bb501e90 /src | |
parent | 1e30a3a49a5eaf2a1e0e4b2d8f4949db9db565e7 (diff) |
src: Support netdev egress hook
Add userspace support for the netdev egress hook which is queued up for
v5.16-rc1, complete with documentation and tests. Usage is identical to
the ingress hook.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/evaluate.c | 2 | ||||
-rw-r--r-- | src/rule.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index 0bc799eb..609e171d 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -4310,6 +4310,8 @@ static uint32_t str2hooknum(uint32_t family, const char *hook) case NFPROTO_NETDEV: if (!strcmp(hook, "ingress")) return NF_NETDEV_INGRESS; + else if (!strcmp(hook, "egress")) + return NF_NETDEV_EGRESS; break; default: break; @@ -675,6 +675,7 @@ static const char * const chain_hookname_str_array[] = { "postrouting", "output", "ingress", + "egress", NULL, }; @@ -832,6 +833,8 @@ const char *hooknum2str(unsigned int family, unsigned int hooknum) switch (hooknum) { case NF_NETDEV_INGRESS: return "ingress"; + case NF_NETDEV_EGRESS: + return "egress"; } break; default: |