All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: issues with ip_route_input/output
Date: Thu, 17 Apr 2003 19:31:17 +0200	[thread overview]
Message-ID: <3E9EE4E5.5040709@trash.net> (raw)

Hi,
most(all?) users of ip_route_output() pass their skbs to ip_finish_output()
or ip_finish_output2() after attaching new dst to skb. other network code
uses skb->dst->output(skb). netfilter can't do this of course, but
dst->output may be set to dst_blackhole/ip_rt_bug which indicate the
packet should be dropped. i've recently send patches to change the way
REJECT/MIRROR route their packets (use ip_route_input() for non-local
source), this is also affected. dst->input may be set to 
dst_discard/ip_error.
ip_error() occurs if their is a unreachable route. an icmp error is then 
sent.
my question is what to do in these cases .. for 
dst_blackhole/dst_discard it's
simple, just drop the packets. i don't know if ip_rt_bug should actually be
called if it occcurs, just dropping might be enough. ip_error is also no 
problem
for REJECT/MIRROR, it makes no sense to send an error for a fake packet,
but i have made an equal patch for ip_route_me_harder and here it would
make sense to send icmp_errors. I also don't want to scatter the code to 
much
with if/else everywhere something needs to be routed, is there a place where
we could keep common stuff like route backwards (REJECT/MIRROR)/
get source address (MASQUERADE/ip_nat_core/ip_fw_compat_masq) ?
maybe also ip_route_me_harder could be moved there from core/netfilter.c ..

Comments ?
Patrick

                 reply	other threads:[~2003-04-17 17:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3E9EE4E5.5040709@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@lists.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.