Subject: Re: [PATCH net-next 13/13] netfilter: ctnetlink: restrict expectfn to helper

From: Florian Westphal <[email-masked]>
Date: Tue, 7 Apr 2026 16:27:26 +0200

Florian Westphal <[email-masked]> wrote:
>  	list_for_each_entry_rcu(cur, &nf_ct_helper_expectfn_list, head) {
> -		if (!strcmp(cur->name, name)) {
> +		if ((cur->helper && !strcmp(cur->helper, helper)) ||
> +		    !strcmp(cur->name, name)) {

Sigh, I don't know why I did not see this earlier.  It looks wrong.

Should this be:

if ((cur->helper && strcmp(cur->helper, helper))
	continue; // skip, name doesn't match

if (!strcmp(cur->name, name)) {
 ...

as is, this restriction has no effect in case the requested
name matches?

AI suggests

if ((cur->helper && !strcmp(cur->helper, helper)) &&
   !strcmp(cur->name, name)) {

... but i think thats bogus too.  What to do?

Send v2 or do you want to followup later?