netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next 0/5] netfilter: Prepare netfilter to future .flowi4_tos conversion.
@ 2024-11-14 16:03 Guillaume Nault
  2024-11-14 16:03 ` [PATCH nf-next 1/5] netfilter: ipv4: Convert ip_route_me_harder() to dscp_t Guillaume Nault
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Guillaume Nault @ 2024-11-14 16:03 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik
  Cc: netfilter-devel, David S. Miller, David Ahern, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, coreteam, netdev,
	Ido Schimmel

There are multiple occasions where Netfilter code needs to perform
route lookups and initialise struct flowi4. As we're in the process of
converting the .flowi4_tos field to dscp_t, we need to convert the
users so that they have a dscp_t value at hand, rather than a __u8.

All netfilter users get the DSCP (TOS) value from IPv4 packet headers.
So we just need to use the new ip4h_dscp() helper to get a dscp_t
variable.

Converting .flowi4_tos to dscp_t will allow to detect regressions where
ECN bits are mistakenly treated as DSCP when doing route lookups.

Guillaume Nault (5):
  netfilter: ipv4: Convert ip_route_me_harder() to dscp_t.
  netfilter: flow_offload: Convert nft_flow_route() to dscp_t.
  netfilter: rpfilter: Convert rpfilter_mt() to dscp_t.
  netfilter: nft_fib: Convert nft_fib4_eval() to dscp_t.
  netfilter: nf_dup4: Convert nf_dup_ipv4_route() to dscp_t.

 net/ipv4/netfilter.c              | 2 +-
 net/ipv4/netfilter/ipt_rpfilter.c | 2 +-
 net/ipv4/netfilter/nf_dup_ipv4.c  | 2 +-
 net/ipv4/netfilter/nft_fib_ipv4.c | 3 ++-
 net/netfilter/nft_flow_offload.c  | 4 ++--
 5 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-11-15 10:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 16:03 [PATCH nf-next 0/5] netfilter: Prepare netfilter to future .flowi4_tos conversion Guillaume Nault
2024-11-14 16:03 ` [PATCH nf-next 1/5] netfilter: ipv4: Convert ip_route_me_harder() to dscp_t Guillaume Nault
2024-11-14 16:03 ` [PATCH nf-next 2/5] netfilter: flow_offload: Convert nft_flow_route() " Guillaume Nault
2024-11-14 16:03 ` [PATCH nf-next 3/5] netfilter: rpfilter: Convert rpfilter_mt() " Guillaume Nault
2024-11-14 16:03 ` [PATCH nf-next 4/5] netfilter: nft_fib: Convert nft_fib4_eval() " Guillaume Nault
2024-11-14 16:03 ` [PATCH nf-next 5/5] netfilter: nf_dup4: Convert nf_dup_ipv4_route() " Guillaume Nault
2024-11-15 10:50 ` [PATCH nf-next 0/5] netfilter: Prepare netfilter to future .flowi4_tos conversion Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).