From: Lance Yang <lance.yang@linux.dev>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Lance Yang <ioworker0@gmail.com>,
kadlec@netfilter.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
coreteam@netfilter.org, linux-kernel@vger.kernel.org,
netfilter-devel@vger.kernel.org, Zi Li <zi.li@linux.dev>
Subject: Re: [RESEND PATCH 1/1] netfilter: load nf_log_syslog on enabling nf_conntrack_log_invalid
Date: Thu, 22 May 2025 21:14:32 +0800 [thread overview]
Message-ID: <0e89bc09-c0ee-49d0-bbde-430cca361fd6@linux.dev> (raw)
In-Reply-To: <ac51507e-28ca-404d-a784-7cc3721ee624@linux.dev>
On 2025/5/22 14:53, Lance Yang wrote:
>
>
> On 2025/5/22 14:34, Florian Westphal wrote:
>> Lance Yang <lance.yang@linux.dev> wrote:
>>> Nice, thanks for jumping in! I'll hold until the helper lands, then
>>> rebase and send the v2.
>>
>> Please just add this new helpre yourself in v2.
Does this helper look correct?
/**
* nf_log_is_registered - Check if NF_LOG is registered for a protocol
* family
*
* @pf: protocol family (e.g., NFPROTO_IPV4)
*
* Returns true if NF_LOG is registered, false otherwise.
*/
bool nf_log_is_registered(int pf)
{
struct nf_logger *logger;
logger = nf_logger_find_get(pf, NF_LOG_TYPE_LOG);
if (logger) {
nf_logger_put(pf, NF_LOG_TYPE_LOG);
return true;
}
logger = nf_logger_find_get(pf, NF_LOG_TYPE_ULOG);
if (logger) {
nf_logger_put(pf, NF_LOG_TYPE_ULOG);
return true;
}
return false;
}
Thanks,
Lance
>
> Ah, got it. I'll do that.
>
> Thanks,
> Lance
>
next prev parent reply other threads:[~2025-05-22 13:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 5:37 [RESEND PATCH 1/1] netfilter: load nf_log_syslog on enabling nf_conntrack_log_invalid Lance Yang
2025-05-21 10:07 ` Pablo Neira Ayuso
2025-05-21 11:21 ` Florian Westphal
2025-05-21 15:21 ` Lance Yang
2025-05-21 18:23 ` Florian Westphal
2025-05-22 2:05 ` Lance Yang
2025-05-22 6:34 ` Florian Westphal
2025-05-22 6:53 ` Lance Yang
2025-05-22 13:14 ` Lance Yang [this message]
2025-05-22 13:19 ` Florian Westphal
2025-05-22 13:58 ` Lance Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e89bc09-c0ee-49d0-bbde-430cca361fd6@linux.dev \
--to=lance.yang@linux.dev \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=ioworker0@gmail.com \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=zi.li@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).