[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3bb31f61-08cd-4680-a16d-20c248e3e1c9@redhat.com>
Date: Tue, 19 Aug 2025 12:46:42 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Oscar Maes <oscmaes92@...il.com>, netdev@...r.kernel.org
Cc: 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 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
Powered by blists - more mailing lists