aboutsummaryrefslogtreecommitdiff
path: root/net/atm
diff options
context:
space:
mode:
authorGravatar Guillaume Nault <gnault@redhat.com> 2024-04-05 22:05:00 +0200
committerGravatar David S. Miller <davem@davemloft.net> 2024-04-08 13:20:51 +0100
commitec20b283009346adc66d5a460b1f8fb5adafbcfe (patch)
tree36b9dfa207e7d4d663dd41d84f8aae36da254627 /net/atm
parentipvlan: handle NETDEV_DOWN event (diff)
downloadlinux-ec20b283009346adc66d5a460b1f8fb5adafbcfe.tar.gz
linux-ec20b283009346adc66d5a460b1f8fb5adafbcfe.tar.bz2
linux-ec20b283009346adc66d5a460b1f8fb5adafbcfe.zip
ipv4: Set scope explicitly in ip_route_output().
Add a "scope" parameter to ip_route_output() so that callers don't have to override the tos parameter with the RTO_ONLINK flag if they want a local scope. This will allow converting flowi4_tos to dscp_t in the future, thus allowing static analysers to flag invalid interactions between "tos" (the DSCP bits) and ECN. Only three users ask for local scope (bonding, arp and atm). The others continue to use RT_SCOPE_UNIVERSE. While there, add a comment to warn users about the limitations of ip_route_output(). Signed-off-by: Guillaume Nault <gnault@redhat.com> Acked-by: Leon Romanovsky <leonro@nvidia.com> # infiniband Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/clip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 294cb9efe3d3..362e8d25a79e 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -463,7 +463,7 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
unlink_clip_vcc(clip_vcc);
return 0;
}
- rt = ip_route_output(&init_net, ip, 0, 1, 0);
+ rt = ip_route_output(&init_net, ip, 0, 0, 0, RT_SCOPE_LINK);
if (IS_ERR(rt))
return PTR_ERR(rt);
neigh = __neigh_lookup(&arp_tbl, &ip, rt->dst.dev, 1);