twx-linux/include
Guillaume Nault 661c63cb34 ipv4: Convert ip_route_input() to dscp_t.
[ Upstream commit 7e863e5db6185b1add0df4cb01b31a4ed1c4b738 ]

Pass a dscp_t variable to ip_route_input(), instead of a plain u8, to
prevent accidental setting of ECN bits in ->flowi4_tos.

Callers of ip_route_input() to consider are:

  * input_action_end_dx4_finish() and input_action_end_dt4() in
    net/ipv6/seg6_local.c. These functions set the tos parameter to 0,
    which is already a valid dscp_t value, so they don't need to be
    adjusted for the new prototype.

  * icmp_route_lookup(), which already has a dscp_t variable to pass as
    parameter. We just need to remove the inet_dscp_to_dsfield()
    conversion.

  * br_nf_pre_routing_finish(), ip_options_rcv_srr() and ip4ip6_err(),
    which get the DSCP directly from IPv4 headers. Define a helper to
    read the .tos field of struct iphdr as dscp_t, so that these
    function don't have to do the conversion manually.

While there, declare *iph as const in br_nf_pre_routing_finish(),
declare its local variables in reverse-christmas-tree order and move
the "err = ip_route_input()" assignment out of the conditional to avoid
checkpatch warning.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/e9d40781d64d3d69f4c79ac8a008b8d67a033e8d.1727807926.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 27843ce6ba3d ("ipvlan: ensure network headers are in skb linear part")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-07 16:45:39 +01:00
..
acpi LoongArch: Fix warnings during S3 suspend 2025-02-08 09:52:27 +01:00
asm-generic Rename .data.once to .data..once to fix resetting WARN*_ONCE 2024-12-09 10:32:59 +01:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-10 14:31:36 +01:00
crypto crypto: ecc - Prevent ecc_digits_from_bytes from reading too many bytes 2025-01-09 13:31:52 +01:00
drm drm/connector: add mutex to protect ELD from concurrent access 2025-02-17 09:40:04 +01:00
dt-bindings dt-bindings: clock: sunxi: Export PLL_VIDEO_2X and PLL_MIPI 2025-02-08 09:51:55 +01:00
keys
kunit
kvm
linux SUNRPC: Prevent looping due to rpc_signal_task() races 2025-03-07 16:45:36 +01:00
math-emu
media media: v4l2-core: v4l2-dv-timings: check cvt/gtf result 2024-12-09 10:32:51 +01:00
memory
misc
net ipv4: Convert ip_route_input() to dscp_t. 2025-03-07 16:45:39 +01:00
pcmcia
ras
rdma IB/core: Add support for XDR link speed 2025-03-07 16:45:37 +01:00
rv rv: Reset per-task monitors also for idle tasks 2025-02-17 09:40:32 +01:00
scsi scsi: Remove scsi device no_start_on_resume flag 2024-10-17 15:24:11 +02:00
soc net: mscc: ocelot: be resilient to loss of PTP packets during transmission 2024-12-19 18:11:29 +01:00
sound ALSA: usb-audio: Update UMP group attributes for GTB blocks, too 2024-12-14 20:00:23 +01:00
target
trace net/ipv4: add tracepoint for icmp_send 2025-03-07 16:45:39 +01:00
uapi IB/core: Add support for XDR link speed 2025-03-07 16:45:37 +01:00
ufs scsi: ufs: core: Add UFS RTC support 2025-03-07 16:45:35 +01:00
vdso
video
xen