mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 14:12:51 +00:00
netfilter: nft_tunnel: also dump ERSPAN_VERSION
This is not necessary, but it'll be easier to parse in userspace, also given that other places like act_tunnel_key, cls_flower and ip_tunnel_core are also doing so. Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
0705f95c33
commit
2149f36dbd
@ -479,6 +479,9 @@ static int nft_tunnel_opts_dump(struct sk_buff *skb,
|
|||||||
htonl(opts->u.vxlan.gbp)))
|
htonl(opts->u.vxlan.gbp)))
|
||||||
return -1;
|
return -1;
|
||||||
} else if (opts->flags & TUNNEL_ERSPAN_OPT) {
|
} else if (opts->flags & TUNNEL_ERSPAN_OPT) {
|
||||||
|
if (nla_put_be32(skb, NFTA_TUNNEL_KEY_ERSPAN_VERSION,
|
||||||
|
htonl(opts->u.erspan.version)))
|
||||||
|
return -1;
|
||||||
switch (opts->u.erspan.version) {
|
switch (opts->u.erspan.version) {
|
||||||
case ERSPAN_VERSION:
|
case ERSPAN_VERSION:
|
||||||
if (nla_put_be32(skb, NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX,
|
if (nla_put_be32(skb, NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX,
|
||||||
|
Loading…
Reference in New Issue
Block a user