diff options
| author | Fernando Fernandez Mancera <fmancera@suse.de> | 2025-10-14 14:20:42 +0200 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2025-10-14 18:30:57 +0200 |
| commit | 376d60e345819b33c1ffafc27bf7dbe21457b9fc (patch) | |
| tree | a54c3f8582a435b39fb9576aca95aec1edf03227 /src | |
| parent | b9516b0a4dfb6e16e3e11c3024683a2df1ea09ab (diff) | |
meta: introduce meta ibrhwaddr support
Can be used in bridge prerouting hook to redirect the packet to the
receiving physical device for processing.
table bridge nat {
chain PREROUTING {
type filter hook prerouting priority 0; policy accept;
ether daddr de:ad:00:00:be:ef meta pkttype set host ether daddr set meta ibrhwaddr accept
}
}
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
| -rw-r--r-- | src/meta.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -23,6 +23,7 @@ #include <arpa/inet.h> #include <linux/netfilter.h> #include <linux/pkt_sched.h> +#include <linux/if_ether.h> #include <linux/if_packet.h> #include <time.h> @@ -704,6 +705,9 @@ const struct meta_template meta_templates[] = { BYTEORDER_HOST_ENDIAN), [NFT_META_BRI_BROUTE] = META_TEMPLATE("broute", &integer_type, 1 , BYTEORDER_HOST_ENDIAN), + [NFT_META_BRI_IIFHWADDR] = META_TEMPLATE("ibrhwaddr", ðeraddr_type, + ETH_ALEN * BITS_PER_BYTE, + BYTEORDER_BIG_ENDIAN), }; static bool meta_key_is_unqualified(enum nft_meta_keys key) |
