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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250819000847-oscmaes92@gmail.com>
Date: Tue, 19 Aug 2025 02:08:47 +0200
From: Oscar Maes <oscmaes92@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, dsahern@...nel.org,
	edumazet@...gle.com, kuba@...nel.org, horms@...nel.org,
	shuah@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/2] net: ipv4: allow directed broadcast
 routes to use dst hint

On Tue, Aug 19, 2025 at 12:46:42PM +0200, Paolo Abeni wrote:
> On 8/14/25 4:03 PM, Oscar Maes wrote:
> > diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> > index fc323994b1fa..57bf6e23b342 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) ||
> > +	    (iph->daddr == 0 && iph->saddr == 0) ||
> 
> ipv4_is_zeronet(iph->daddr) is preferred for the daddr check, and it's
> not clear why the new check for the saddr is needed here.
> 
> /P
> 

Will change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ