]> git.baikalelectronics.ru Git - kernel.git/commit
erspan: get the proto with the md version for collect_md
authorXin Long <lucien.xin@gmail.com>
Thu, 11 May 2023 23:22:11 +0000 (19:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 11:44:05 +0000 (12:44 +0100)
commit2be8e2ee09ea6d66c93ad5feff4ecef684ce0b30
treeefcf4f69815fc77cea70462f372c4a03ed18eab9
parentd18e05098d59b215c634845ea0cd30c3e067d9b4
erspan: get the proto with the md version for collect_md

[ Upstream commit d80fc101d2eb9b3188c228d61223890aeea480a4 ]

In commit f6ed7126ce09 ("erspan: build the header with the right proto
according to erspan_ver"), it gets the proto with t->parms.erspan_ver,
but t->parms.erspan_ver is not used by collect_md branch, and instead
it should get the proto with md->version for collect_md.

Thanks to Kevin for pointing this out.

Fixes: f6ed7126ce09 ("erspan: build the header with the right proto according to erspan_ver")
Fixes: f2bf205dab51 ("ip6_gre: add erspan v2 support")
Reported-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/ip6_gre.c