mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-30 02:26:26 +00:00
gtp: Prepare ip4_route_output_gtp() to .flowi4_tos conversion.
Use inet_sk_dscp() to get the socket DSCP value as dscp_t, instead of ip_sock_rt_tos() which returns a __u8. This will ease the conversion of fl4->flowi4_tos to dscp_t, which now just becomes a matter of dropping the inet_dscp_to_dsfield() call. Signed-off-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/06bdb310a075355ff059cd32da2efc29a63981c9.1737034675.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
02673d58ad
commit
2ce7289f18
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
#include <net/protocol.h>
|
#include <net/protocol.h>
|
||||||
|
#include <net/inet_dscp.h>
|
||||||
|
#include <net/inet_sock.h>
|
||||||
#include <net/ip.h>
|
#include <net/ip.h>
|
||||||
#include <net/ipv6.h>
|
#include <net/ipv6.h>
|
||||||
#include <net/udp.h>
|
#include <net/udp.h>
|
||||||
@ -350,7 +352,7 @@ static struct rtable *ip4_route_output_gtp(struct flowi4 *fl4,
|
|||||||
fl4->flowi4_oif = sk->sk_bound_dev_if;
|
fl4->flowi4_oif = sk->sk_bound_dev_if;
|
||||||
fl4->daddr = daddr;
|
fl4->daddr = daddr;
|
||||||
fl4->saddr = saddr;
|
fl4->saddr = saddr;
|
||||||
fl4->flowi4_tos = ip_sock_rt_tos(sk);
|
fl4->flowi4_tos = inet_dscp_to_dsfield(inet_sk_dscp(inet_sk(sk)));
|
||||||
fl4->flowi4_scope = ip_sock_rt_scope(sk);
|
fl4->flowi4_scope = ip_sock_rt_scope(sk);
|
||||||
fl4->flowi4_proto = sk->sk_protocol;
|
fl4->flowi4_proto = sk->sk_protocol;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user