summaryrefslogtreecommitdiffstats
path: root/net/ipv4/datagram.c
diff options
context:
space:
mode:
authorGuillaume Nault <gnault@redhat.com>2022-04-21 01:21:24 +0200
committerDavid S. Miller <davem@davemloft.net>2022-04-22 13:06:03 +0100
commit16a28267774cd9f85405ef83d4afcbd0355e5817 (patch)
treeda6c5a99699f82f3831eab7e8294ee3f7b4c0345 /net/ipv4/datagram.c
parentcb1e6bf42bce63158884ab83fb171b518693c771 (diff)
downloadlinux-stable-16a28267774cd9f85405ef83d4afcbd0355e5817.tar.gz
linux-stable-16a28267774cd9f85405ef83d4afcbd0355e5817.tar.bz2
linux-stable-16a28267774cd9f85405ef83d4afcbd0355e5817.zip
ipv4: Don't reset ->flowi4_scope in ip_rt_fix_tos().
All callers already initialise ->flowi4_scope with RT_SCOPE_UNIVERSE, either by manual field assignment, memset(0) of the whole structure or implicit structure initialisation of on-stack variables (RT_SCOPE_UNIVERSE actually equals 0). Therefore, we don't need to always initialise ->flowi4_scope in ip_rt_fix_tos(). We only need to reduce the scope to RT_SCOPE_LINK when the special RTO_ONLINK flag is present in the tos. This will allow some code simplification, like removing ip_rt_fix_tos(). Also, the long term idea is to remove RTO_ONLINK entirely by properly initialising ->flowi4_scope, instead of overloading ->flowi4_tos with a special flag. Eventually, this will allow to convert ->flowi4_tos to dscp_t. Signed-off-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/datagram.c')
0 files changed, 0 insertions, 0 deletions