mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-21 20:22:13 +08:00
ip6_tunnel: Unmask upper DSCP bits in ip4ip6_err()
Unmask the upper DSCP bits when calling ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20240903135327.2810535-4-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
97edbbaad3
commit
de1fb3e8b0
@ -53,6 +53,7 @@
|
|||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
#include <net/netns/generic.h>
|
#include <net/netns/generic.h>
|
||||||
#include <net/dst_metadata.h>
|
#include <net/dst_metadata.h>
|
||||||
|
#include <net/inet_dscp.h>
|
||||||
|
|
||||||
MODULE_AUTHOR("Ville Nuorvala");
|
MODULE_AUTHOR("Ville Nuorvala");
|
||||||
MODULE_DESCRIPTION("IPv6 tunneling device");
|
MODULE_DESCRIPTION("IPv6 tunneling device");
|
||||||
@ -608,7 +609,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
|||||||
|
|
||||||
/* Try to guess incoming interface */
|
/* Try to guess incoming interface */
|
||||||
rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL, eiph->saddr,
|
rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL, eiph->saddr,
|
||||||
0, 0, 0, IPPROTO_IPIP, RT_TOS(eiph->tos), 0);
|
0, 0, 0, IPPROTO_IPIP,
|
||||||
|
eiph->tos & INET_DSCP_MASK, 0);
|
||||||
if (IS_ERR(rt))
|
if (IS_ERR(rt))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -619,7 +621,8 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
|
|||||||
if (rt->rt_flags & RTCF_LOCAL) {
|
if (rt->rt_flags & RTCF_LOCAL) {
|
||||||
rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
|
rt = ip_route_output_ports(dev_net(skb->dev), &fl4, NULL,
|
||||||
eiph->daddr, eiph->saddr, 0, 0,
|
eiph->daddr, eiph->saddr, 0, 0,
|
||||||
IPPROTO_IPIP, RT_TOS(eiph->tos), 0);
|
IPPROTO_IPIP,
|
||||||
|
eiph->tos & INET_DSCP_MASK, 0);
|
||||||
if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) {
|
if (IS_ERR(rt) || rt->dst.dev->type != ARPHRD_TUNNEL6) {
|
||||||
if (!IS_ERR(rt))
|
if (!IS_ERR(rt))
|
||||||
ip_rt_put(rt);
|
ip_rt_put(rt);
|
||||||
|
Loading…
Reference in New Issue
Block a user