diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-08-21 11:12:57 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-08-27 23:50:58 +0200 |
| commit | ffc40b38d58d3f754d20c0e586981b2f442a247e (patch) | |
| tree | 9935ca117fa1c3253c4d4e6384191be4a54a45eb /include/rule.h | |
| parent | 35d9c77c5745219ad6bf1c5fc7512c1c92c70457 (diff) | |
tunnel: add erspan support
This patch extends the tunnel metadata object to define erspan tunnel
specific configurations:
table netdev x {
tunnel y {
id 10
ip saddr 192.168.2.10
ip daddr 192.168.2.11
sport 10
dport 20
ttl 10
erspan {
version 1
index 2
}
}
}
Joint work with Fernando.
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/rule.h')
| -rw-r--r-- | include/rule.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h index 0fa87b52..71e9a07e 100644 --- a/include/rule.h +++ b/include/rule.h @@ -492,6 +492,11 @@ struct secmark { char ctx[NFT_SECMARK_CTX_MAXLEN]; }; +enum tunnel_type { + TUNNEL_UNSPEC = 0, + TUNNEL_ERSPAN, +}; + struct tunnel { uint32_t id; struct expr *src; @@ -500,6 +505,19 @@ struct tunnel { uint16_t dport; uint8_t tos; uint8_t ttl; + enum tunnel_type type; + union { + struct { + uint32_t version; + struct { + uint32_t index; + } v1; + struct { + uint8_t direction; + uint8_t hwid; + } v2; + } erspan; + }; }; /** |
