lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <89f5efc6-e380-4523-a512-38fef942890a@kernel.org>
Date: Wed, 20 Aug 2025 08:19:59 -0600
From: David Ahern <dsahern@...nel.org>
To: Oscar Maes <oscmaes92@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, horms@...nel.org, shuah@...nel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/2] net: ipv4: allow directed broadcast
 routes to use dst hint

On 8/19/25 11:46 AM, Oscar Maes wrote:
> Currently, ip_extract_route_hint uses RTN_BROADCAST to decide
> whether to use the route dst hint mechanism.
> 
> This check is too strict, as it prevents directed broadcast
> routes from using the hint, resulting in poor performance
> during bursts of directed broadcast traffic.
> 
> Fix this in ip_extract_route_hint and modify ip_route_use_hint
> to preserve the intended behaviour.
> 
> Signed-off-by: Oscar Maes <oscmaes92@...il.com>
> ---
>  net/ipv4/ip_input.c | 11 +++++++----
>  net/ipv4/route.c    |  2 +-
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index fc323994b1fa..a09aca2c8567 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -587,9 +587,13 @@ static void ip_sublist_rcv_finish(struct list_head *head)
>  }
>  
>  static struct sk_buff *ip_extract_route_hint(const struct net *net,
> -					     struct sk_buff *skb, int rt_type)
> +					     struct sk_buff *skb)
>  {
> -	if (fib4_has_custom_rules(net) || rt_type == RTN_BROADCAST ||
> +	const struct iphdr *iph = ip_hdr(skb);
> +
> +	if (fib4_has_custom_rules(net) ||
> +	    ipv4_is_lbcast(iph->daddr) ||
> +	    ipv4_is_zeronet(iph->daddr) ||
>  	    IPCB(skb)->flags & IPSKB_MULTIPATH)
>  		return NULL;
>  

seems ok to me.

Reviewed-by: David Ahern <dsahern@...nel.org>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ