From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] nefilter: nfnetlink: add nfnetlink_set_err and use it in ctnetlink
Date: Mon, 16 Mar 2009 15:53:36 +0100 [thread overview]
Message-ID: <49BE67F0.3040109@trash.net> (raw)
In-Reply-To: <49BE669D.7040502@netfilter.org>
Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>> Pablo Neira Ayuso wrote:
>>> This patch adds nfnetlink_set_err() to propagate the error to netlink
>>> broadcast listener in case of memory allocation errors in the
>>> message building.
>>> +void nfnetlink_set_err(u32 group, int error)
>>> +{
>>> + netlink_set_err(nfnl, 0, group, error);
>>> +}
>>> +EXPORT_SYMBOL_GPL(nfnetlink_set_err);
>> Please make the pid argument controllable by the caller as well. This
>> is necessary to avoid double error notifications when an error occurs
>> in response to a user-request triggering notifications.
>
> OK, I'll add it, but the pid passed as argument will be zero by now.
> Note that, in the current code, user-requests ignore notification
> errors, so there is no chance to get double error notifications.
I know. I have the same function in my nftables tree though (but
requiring the pid-argument), so we might as well add it in a
future-proof way.
> I have another patch here to propagate errors of user-requests that
> result in failing notifications, then the pid parameter in
> nfnetlink_set_err() will be useful. That patch also includes the use of
> NETLINK_BROADCAST_ERROR. I'll send you that patch soon.
Thanks.
next prev parent reply other threads:[~2009-03-16 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 16:32 [PATCH] nefilter: nfnetlink: add nfnetlink_set_err and use it in ctnetlink Pablo Neira Ayuso
2009-03-16 14:13 ` Patrick McHardy
2009-03-16 14:47 ` Pablo Neira Ayuso
2009-03-16 14:53 ` Patrick McHardy [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 10:07 Pablo Neira Ayuso
2009-03-23 12:21 ` Patrick McHardy
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=49BE67F0.3040109@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.