From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Monib <monib619@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nftables netlink cache initialization failure with dnsmasq
Date: Tue, 6 May 2025 22:24:22 +0200 [thread overview]
Message-ID: <aBpv9rBirbFkpWvB@calendula> (raw)
In-Reply-To: <CAJV_tgbKEHTn9T+AZSduNe4YdxQxe8aeriteuYzBmjUm9vNnyg@mail.gmail.com>
Hi,
On Tue, May 06, 2025 at 03:57:23PM +0500, Monib wrote:
> Hello,
>
> An OpenWRT user here who has been trying to set up split tunneling
> using https://docs.openwrt.melmac.net/pbr/, which uses dnsmasq and
> nftables, but I am having some issues.
>
> I am encountering an error — "netlink: Error: cache initialization
> failed: Protocol error" — which seems to be produced by nftables. This
> error message was introduced in the following commit:
> https://git.netfilter.org/nftables/commit/?id=a2ddb38f7eb818312c50be78028bc35145c039ae.
> The commit message says: "cache initialization failure (which should
> not ever happen) is not reported to the user."
This commit you refer above is exposing an existing issue.
> The issue starts happening semi-randomly but seems to occur when too
> many DNS requests are made in a short period. Once it appears, the
> relevant nftables sets stop being populated by dnsmasq.
>
> Here is what I see in the logs:
>
> Sun Mar 23 17:52:24 2025 daemon.err dnsmasq[4]: nftset inet fw4
> pbr_wg_xray_4_dst_ip_cfg066ff5 netlink: Error: cache initialization
> failed: Protocol error
EPROTO can be reported by libmnl with netlink sequence problems.
Quickly browsing dnsmasq code, it looks like there is a pool of child
processes that are sharing a single nft_ctx handle to handle events,
two or more child processes are racing.
I can expand libnftables(3) manpage to clarify this.
Thanks for reporting.
next prev parent reply other threads:[~2025-05-06 20:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 10:57 nftables netlink cache initialization failure with dnsmasq Monib
2025-05-06 20:24 ` Pablo Neira Ayuso [this message]
2025-05-10 12:52 ` Monib
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=aBpv9rBirbFkpWvB@calendula \
--to=pablo@netfilter.org \
--cc=monib619@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/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