]> git.baikalelectronics.ru Git - kernel.git/commit
gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst()
authorGuillaume Nault <gnault@redhat.com>
Mon, 10 Jan 2022 13:43:09 +0000 (14:43 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 12 Jan 2022 04:36:08 +0000 (20:36 -0800)
commitf37a1a6095e9c82388eac462febe7549c85d8676
tree0b96d0fa492edf379cb8eb633d95b36bc1bd7a63
parentba1c2957aaf538d843c3734aeee5f48bd467a6cf
gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst()

Mask the ECN bits before initialising ->flowi4_tos. The tunnel key may
have the last ECN bit set, which will interfere with the route lookup
process as ip_route_output_key_hash() interpretes this bit specially
(to restrict the route scope).

Found by code inspection, compile tested only.

Fixes: 367a8588e86b ("ip_gre: Refactor collect metatdata mode tunnel xmit to ip_md_tunnel_xmit")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/ip_gre.c