From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>, wintre <mikeacar@gmail.com>
Subject: Re: DROP still returns -EPERM to userspace in OUTPUT chain
Date: Sat, 23 May 2009 12:47:56 +0200 [thread overview]
Message-ID: <4A17D45C.6040909@netfilter.org> (raw)
In-Reply-To: <alpine.LSU.2.00.0905211707050.23519@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> Hi,
>
>
> once again, irc snatched this report:
>
> |2009-05-20T20:56 < Wintre:#Netfilter>
> |
> |Specifically, when I add a DROP rule to the local firewall, send(2)
> |starts getting EPERM. The netfilter core code includes
> |nf_hook_slow(), which says:
> |
> | /* Returns 1 if okfn() needs to be executed by the caller,
> | * -EPERM for NF_DROP, 0 otherwise. */
> |
> |So, this seems kind of crazy to me. I always thought drop was
> |supposed to be silent, and changing the return value of send(2),
> |well. Bad. Anybody got a link to a discussion of this issue? Or is it
> |just a plain old bug?
>
> I agree with the user here. For now, one had to make use of the
> “STEAL” target [1] to get the real silent drop behavior for the
> OUTPUT chain. Surely that is not the ideal thing either.
> Requesting comments from NF maintainers.
I'm curious, what application would need to ignore that error? Returning
-EPERM seems to me quite sane to note that the kernel is explicit (via
iptables, for example) not allowing permission to send().
--
"Los honestos son inadaptados sociales" -- Les Luthiers
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-05-23 11:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 9:44 DROP still returns -EPERM to userspace in OUTPUT chain Jan Engelhardt
2009-05-23 10:47 ` Pablo Neira Ayuso [this message]
2009-05-23 11:11 ` Jan Engelhardt
2009-05-23 11:43 ` Pablo Neira Ayuso
2009-05-23 13:20 ` Jan Engelhardt
2009-05-23 15:02 ` Pablo Neira Ayuso
2009-05-25 14:56 ` Patrick McHardy
2009-06-07 4:22 ` Mike Acar
2009-06-08 13:56 ` 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=4A17D45C.6040909@netfilter.org \
--to=pablo@netfilter.org \
--cc=jengelh@medozas.de \
--cc=mikeacar@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;
as well as URLs for NNTP newsgroup(s).