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: <fd88b13f-c660-4736-8b48-cd1146360c32@web.de>
Date: Sun, 20 Jul 2025 09:05:16 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Yue Haibing <yuehaibing@...wei.com>, netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, David Ahern <dsahern@...nel.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net-next] ip6_gre: Factor out common ip6gre tunnel match
 into helper

> Extract common ip6gre tunnel match from ip6gre_tunnel_lookup() into new
> helper function ip6gre_tunnel_match() to reduces code duplication.
…

                                           reduce?

…
> +++ b/net/ipv6/ip6_gre.c
> @@ -111,8 +111,32 @@ static u32 HASH_ADDR(const struct in6_addr *addr)
…
-/* Given src, dst and key, find appropriate for input tunnel. */
+static bool ip6gre_tunnel_match(struct ip6_tnl *t, int dev_type, int link,
+				int *cand_score, struct ip6_tnl **ret)
+{
+	int score = 0;
+
+	if (t->dev->type != ARPHRD_IP6GRE &&
+	    t->dev->type != dev_type)
+		return false;
…

May the scope be reduced (behind the input parameter validation)
also for this local variable?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ