libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
authorGuillaume Nault <gnault@redhat.com>
Mon, 10 Jan 2022 13:43:11 +0000 (14:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:01:00 +0000 (09:01 +0100)
commit93de8a63f6049e74465674db554a66c66b2d80e2
tree5e72aec1b554a1ad3baac892efd3cee673babcd0
parentd27047379e949a26081ffe4a688aac65872778a4
libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()

commit a915deaa9abe4fb3a440312c954253a6a733608e upstream.

Mask the ECN bits before calling ip_route_output_ports(). The tos
variable might be passed directly from an IPv4 header, so it may have
the last ECN bit set. This interferes 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: 804c2f3e36ef ("libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route()")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c