mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kuznet@ms2.inr.ac.ru
To: rusty@rustcorp.com.au (Rusty Russell)
Cc: davem@redhat.com, rusty@rustcorp.com.au,
	linux-kernel@vger.kernel.org, netfilter-devel@lists.samba.org
Subject: Re: Fw: Networking: repeatable oops in 2.4.15-pre2
Date: Tue, 13 Nov 2001 18:25:45 +0300 (MSK)	[thread overview]
Message-ID: <200111131525.SAA29471@ms2.inr.ac.ru> (raw)
In-Reply-To: <E163ZiI-0001CR-00@wagner> from "Rusty Russell" at Nov 13, 1 08:18:38 pm

Hello!

> The NAT code is special: it will always mangle packet the same way, so
> it doesn't *REALLY* matter if we mangle the original packet for local
> output (if we change IP headers in different ways for retransmission
> of the same packet, we would have much bigger problems).

No, this does not matter at all if you change only headers.
Netfilter is first who sees output packets and it may rewrite them
mostly arbitraririly: packet sockets, devices see only rewritten copy.

When retransmitting tcp prepares new headers and, hence, checks
for clonin itself, if someone holds the packet it prepares copy.

But if a hook changes _data_ (f.e. ftp packets), it can break original
packet sitting in tcp queue and this is fatal. So, when mangling
data, packet must be always copied. When mangling header, no copy
is required.


> Does this work for everyone?  Particularly while running tcpdump?

It does, but I cannot say "for everyone", it will work with current
protocol suite, but probably will break with out-of-tree stacks.

Anyway, if it will not work, it will be problem not of netfilter,
but of the guy who did not prepare right ownership. :-)

Alexey

  reply	other threads:[~2001-11-13 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200111101857.VAA17220@ms2.inr.ac.ru>
2001-11-13  9:18 ` Rusty Russell
2001-11-13 15:25   ` kuznet [this message]
2001-11-13 16:00     ` Rusty Russell

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=200111131525.SAA29471@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@lists.samba.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®