* Resolving inner ICMP connections
@ 2005-12-01 19:33 Mark Huang
2005-12-04 16:18 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: Mark Huang @ 2005-12-01 19:33 UTC (permalink / raw)
To: netfilter-devel
Hi all,
Is it a bug that
net/ipv4/netfilter/ip_conntrack_proto_icmp.c:icmp_error_message()
associates ICMP error message packets with the connection specified in
the inner IP packet, even if the direction of that connection makes no
sense?
I found a router in France that accidentally swaps the direction of the
inner IP packet, instead of preserving it verbatim inside the ICMP error
message. So, for instance, if you (A) traceroute it (B):
IP: A -> B
UDP: a -> b
You get back an ICMP destination unreachable message that looks like:
IP: B -> A
ICMP: type 3, code 3
IP: B -> A
UDP: b -> a
Instead of:
IP: B -> A
ICMP: type 3, code 3
IP: A -> B
UDP: a -> b
Obviously there's something seriously wrong with this router. What
happens is that the ICMP error message gets associated with the original
side of the connection (as in IP_CT_DIR_ORIGINAL), not the reply side,
messing up a few assumptions I was making in my NF_IP_LOCAL_IN hook.
Thanks,
--Mark
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Resolving inner ICMP connections
2005-12-01 19:33 Resolving inner ICMP connections Mark Huang
@ 2005-12-04 16:18 ` Patrick McHardy
[not found] ` <43933E81.3080702@cs.princeton.edu>
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2005-12-04 16:18 UTC (permalink / raw)
To: Mark Huang; +Cc: netfilter-devel
Mark Huang wrote:
> Hi all,
>
> Is it a bug that
> net/ipv4/netfilter/ip_conntrack_proto_icmp.c:icmp_error_message()
> associates ICMP error message packets with the connection specified in
> the inner IP packet, even if the direction of that connection makes no
> sense?
That depends. What do you mean with "makes no sense"?
> I found a router in France that accidentally swaps the direction of the
> inner IP packet, instead of preserving it verbatim inside the ICMP error
> message. So, for instance, if you (A) traceroute it (B):
Maybe an old version of linux? :) NAT used to do stange things to
locally generated ICMP packets until about a year ago.
> IP: A -> B
> UDP: a -> b
>
> You get back an ICMP destination unreachable message that looks like:
>
> IP: B -> A
> ICMP: type 3, code 3
> IP: B -> A
> UDP: b -> a
>
> Instead of:
>
> IP: B -> A
> ICMP: type 3, code 3
> IP: A -> B
> UDP: a -> b
>
> Obviously there's something seriously wrong with this router. What
> happens is that the ICMP error message gets associated with the original
> side of the connection (as in IP_CT_DIR_ORIGINAL), not the reply side,
> messing up a few assumptions I was making in my NF_IP_LOCAL_IN hook.
What are these assumptions?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-04 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-01 19:33 Resolving inner ICMP connections Mark Huang
2005-12-04 16:18 ` Patrick McHardy
[not found] ` <43933E81.3080702@cs.princeton.edu>
2005-12-04 20:24 ` 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.