Linux Netfilter development
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: rfc: DROP returns error
Date: Tue, 09 Sep 2008 08:27:04 +0200	[thread overview]
Message-ID: <48C61738.8040903@trash.net> (raw)
In-Reply-To: <alpine.LNX.1.10.0809061338180.20668@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> Time and again I notice users complaining about DROP returning an error 
> when used in the OUTPUT chain:
> 
> root@nuqneh:~# iptables -A OUTPUT -o lo -p icmp -j DROP
> root@nuqneh:~# ping -c1 localhost
> PING localhost (127.0.0.1) 56(84) bytes of data.
> ping: sendmsg: Operation not permitted
> --- localhost ping statistics ---
> 1 packets transmitted, 0 received, 100% packet loss, time 0ms
> 
> I am wondering whether we should either add a new verdict to
> accomodate for this, or do the following:

I've been thinking about this myself. EPERM for packets dropped by
an explicit DROP seems fine in general. There are other cases where
this is not correct though, for example when rerouting in mangle
and we don't have a route anymore.

I think what we should do instead of adding new verdicts is something
similar to how NF_QUEUE works, encode the error code in the upper 16
bits and return it from nf_hook_slow.

      reply	other threads:[~2008-09-09  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 17:41 rfc: DROP returns error Jan Engelhardt
2008-09-09  6:27 ` Patrick McHardy [this message]

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=48C61738.8040903@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --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