libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
commita915deaa9a
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:804c2f3e36
("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd5c24d223
commit
7b9d40e9f6
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include <linux/tcp.h>
|
#include <linux/tcp.h>
|
||||||
#include <linux/ipv6.h>
|
#include <linux/ipv6.h>
|
||||||
|
#include <net/inet_ecn.h>
|
||||||
#include <net/route.h>
|
#include <net/route.h>
|
||||||
#include <net/ip6_route.h>
|
#include <net/ip6_route.h>
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ cxgb_find_route(struct cxgb4_lld_info *lldi,
|
|||||||
|
|
||||||
rt = ip_route_output_ports(&init_net, &fl4, NULL, peer_ip, local_ip,
|
rt = ip_route_output_ports(&init_net, &fl4, NULL, peer_ip, local_ip,
|
||||||
peer_port, local_port, IPPROTO_TCP,
|
peer_port, local_port, IPPROTO_TCP,
|
||||||
tos, 0);
|
tos & ~INET_ECN_MASK, 0);
|
||||||
if (IS_ERR(rt))
|
if (IS_ERR(rt))
|
||||||
return NULL;
|
return NULL;
|
||||||
n = dst_neigh_lookup(&rt->dst, &peer_ip);
|
n = dst_neigh_lookup(&rt->dst, &peer_ip);
|
||||||
|
Reference in New Issue
Block a user