All of lore.kernel.org
 help / color / mirror / Atom feed
* Corruption on mangle/INPUT when MARKing packets
@ 2003-01-04  1:47 Costa Tsaousis
  2003-01-06 12:52 ` Harald Welte
  0 siblings, 1 reply; 6+ messages in thread
From: Costa Tsaousis @ 2003-01-04  1:47 UTC (permalink / raw)
  To: netfilter-devel

Hi all, and happy new year...

I am the author of FireHOL (http://firehol.sf.net) an iptables firewall
generator. During a few experiments I made I believe I have found a bug in
iptables. I am very sorry if it has already been fixed, but I searched
last year's list archives and I didn't find it.

To reproduce the bug, type:

# /etc/init.d/iptables stop
# iptables -t mangle -A INPUT -p icmp -j MARK --set-mark 1

Now, this host will be unpingable.
If INPUT is changed to PREROUTING, pings work.

kernel: 2.4.18-19.8.0smp
iptables: 1.2.6a
Distro: RedHat 8.0

I experimented a bit more and found the following:

[root@194.30.193.23]# ping -c 1 195.97.5.206

Entries bellow belong to the log of 195.97.5.206
------------------------------------------------
[request] everything ok here
Jan  4 02:34:57 gateway kernel: PREROUTING/mangle [1]: IN=ppp0 OUT= MAC=
SRC=194.30.193.23 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=61 ID=0
DF PROTO=ICMP TYPE=8 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: PREROUTING/nat    [1]: IN=ppp0 OUT= MAC=
SRC=194.30.193.23 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=61 ID=0
DF PROTO=ICMP TYPE=8 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: INPUT/mangle [2]: IN=ppp0 OUT= MAC=
SRC=194.30.193.23 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=61 ID=0
DF PROTO=ICMP TYPE=8 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: INPUT/filter [2]: IN=ppp0 OUT= MAC=
SRC=194.30.193.23 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=61 ID=0
DF PROTO=ICMP TYPE=8 CODE=0 ID=34827 SEQ=0

[reply] !!! here is the error: source and destination are the same, TYPE
is 0, output device is lo.
Jan  4 02:34:57 gateway kernel: OUTPUT/mangle [4]: IN= OUT=lo
SRC=195.97.5.206 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466
PROTO=ICMP TYPE=0 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: OUTPUT/filter [4]: IN= OUT=lo
SRC=195.97.5.206 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466
PROTO=ICMP TYPE=0 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: POSTROUTING/mangle [5]: IN= OUT=lo
SRC=195.97.5.206 DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466
PROTO=ICMP TYPE=0 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: PREROUTING/mangle [1]: IN=lo OUT=
MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=195.97.5.206
DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466 PROTO=ICMP
TYPE=0 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: INPUT/mangle [2]: IN=lo OUT=
MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=195.97.5.206
DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466 PROTO=ICMP
TYPE=0 CODE=0 ID=34827 SEQ=0
Jan  4 02:34:57 gateway kernel: INPUT/filter [2]: IN=lo OUT=
MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=195.97.5.206
DST=195.97.5.206 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=9466 PROTO=ICMP
TYPE=0 CODE=0 ID=34827 SEQ=0

Keep up the good work...

Kind Regards
Costa Tsaousis

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-08 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-04  1:47 Corruption on mangle/INPUT when MARKing packets Costa Tsaousis
2003-01-06 12:52 ` Harald Welte
2003-01-06 13:13   ` Costa Tsaousis
2003-01-06 16:26   ` Patrick McHardy
2003-01-08 17:07     ` Harald Welte
2003-01-08 18:23       ` Patrick McHardy

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.