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: <183561ba-a6e1-4036-9555-d773c14d14bb@redhat.com>
Date: Thu, 13 Mar 2025 13:40:35 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Justin Iurman <justin.iurman@...ege.be>, netdev@...r.kernel.org
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
 kuba@...nel.org, horms@...nel.org, David Lebrun <dlebrun@...gle.com>,
 Andrea Mayer <andrea.mayer@...roma2.it>,
 Stefano Salsano <stefano.salsano@...roma2.it>,
 Ahmed Abdelsalam <ahabdels.dev@...il.com>,
 Mathieu Xhonneux <m.xhonneux@...il.com>, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net 4/7] net: ipv6: seg6_local: fix lwtunnel_input() loop

On 3/11/25 3:12 PM, Justin Iurman wrote:
> ---
>  net/ipv6/seg6_local.c | 85 +++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 81 insertions(+), 4 deletions(-)
> 
> diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
> index ac1dbd492c22..15485010cdfb 100644
> --- a/net/ipv6/seg6_local.c
> +++ b/net/ipv6/seg6_local.c
> @@ -378,8 +378,16 @@ static void seg6_next_csid_advance_arg(struct in6_addr *addr,
>  static int input_action_end_finish(struct sk_buff *skb,
>  				   struct seg6_local_lwt *slwt)
>  {
> +	struct lwtunnel_state *lwtst = skb_dst(skb)->lwtstate;
> +
>  	seg6_lookup_nexthop(skb, NULL, 0);
>  
> +	/* avoid lwtunnel_input() reentry loop when destination is the same
> +	 * after transformation
> +	 */
> +	if (lwtst == skb_dst(skb)->lwtstate)
> +		return lwtst->orig_input(skb);
> +
>  	return dst_input(skb);

The above few lines are repeted a lot of times below. Please factor them
out in an helper and re-use it.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ