diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-08-21 11:13:00 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2025-08-27 23:51:10 +0200 |
| commit | 59f03bf14835fe5764b016491ce50715df5711c2 (patch) | |
| tree | f8a090bd62f3bcb5176b45b2d97645ee78b457bb /include/rule.h | |
| parent | d933d551f8db99f2e5f8b6ddcb3a8d9a7a68eeb0 (diff) | |
tunnel: add geneve support
This patch extends the tunnel metadata object to define geneve 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
geneve {
class 0x1010 opt-type 0x1 data "0x12345678"
class 0x1020 opt-type 0x2 data "0x87654321"
class 0x2020 opt-type 0x3 data "0x87654321abcdeffe"
}
}
}
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 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h index c52af2c4..498a88bf 100644 --- a/include/rule.h +++ b/include/rule.h @@ -496,6 +496,15 @@ enum tunnel_type { TUNNEL_UNSPEC = 0, TUNNEL_ERSPAN, TUNNEL_VXLAN, + TUNNEL_GENEVE, +}; + +struct tunnel_geneve { + struct list_head list; + uint16_t geneve_class; + uint8_t type; + uint8_t data[NFTNL_TUNNEL_GENEVE_DATA_MAXLEN]; + uint32_t data_len; }; struct tunnel { @@ -521,9 +530,14 @@ struct tunnel { struct { uint32_t gbp; } vxlan; + struct list_head geneve_opts; }; }; +int tunnel_geneve_data_str2array(const char *hexstr, + uint8_t *out_data, + uint32_t *out_len); + /** * struct obj - nftables stateful object statement * |
