Commit b15e2e49 authored by Louis Peens's avatar Louis Peens Committed by Jakub Kicinski

nfp: flower: fix incorrect struct type in GRE key_size

Looks like a copy-paste error sneaked in here at some point,
causing the key_size for these tunnels to be calculated
incorrectly. This size ends up being send to the firmware,
causing unexpected behaviour in some cases.

Fixes: 78a722af ("nfp: flower: compile match for IPv6 tunnels")
Reported-by: default avatarChaoyong He <chaoyong.he@corigine.com>
Signed-off-by: default avatarLouis Peens <louis.peens@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20221007092132.218386-1-simon.horman@corigine.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5b4c189d
...@@ -373,10 +373,10 @@ nfp_flower_calculate_key_layers(struct nfp_app *app, ...@@ -373,10 +373,10 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,
if (ipv6_tun) { if (ipv6_tun) {
key_layer_two |= NFP_FLOWER_LAYER2_TUN_IPV6; key_layer_two |= NFP_FLOWER_LAYER2_TUN_IPV6;
key_size += key_size +=
sizeof(struct nfp_flower_ipv6_udp_tun); sizeof(struct nfp_flower_ipv6_gre_tun);
} else { } else {
key_size += key_size +=
sizeof(struct nfp_flower_ipv4_udp_tun); sizeof(struct nfp_flower_ipv4_gre_tun);
} }
if (enc_op.key) { if (enc_op.key) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment