Skip to contentSkip to conversation

ICMP error handling in CLUSTERIP

DISCUSSION Alexander Stieglecker 3 participants 4 messages Apr 6, 2005 – Apr 11, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

when I browsed through the CLUSTERIP target function I discovered the following pice of code:

/* special case: ICMP error handling. conntrack distinguishes between
* error messages (RELATED) and information requests (see below) */
if ((*pskb)->nh.iph->protocol == IPPROTO_ICMP

    && (ctinfo == IP_CT_RELATED 
	|| ctinfo == IP_CT_IS_REPLY+IP_CT_IS_REPLY))
	return IPT_CONTINUE;

IP_CT_IS_REPLY+IP_CT_IS_REPLY equals six which is greater than IP_CT_NUMBER. Shouldn't it be something like IP_CT_IS_RELATED+IP_CT_IS_REPLY?

#1 lore raw
Quoted 9 lines · Alexander Stieglecker

/* special case: ICMP error handling. conntrack distinguishes between
* error messages (RELATED) and information requests (see below) */
if ((*pskb)->nh.iph->protocol == IPPROTO_ICMP

    && (ctinfo == IP_CT_RELATED 
	|| ctinfo == IP_CT_IS_REPLY+IP_CT_IS_REPLY))
	return IPT_CONTINUE;

IP_CT_IS_REPLY+IP_CT_IS_REPLY equals six which is greater than IP_CT_NUMBER. Shouldn't it be something like IP_CT_IS_RELATED+IP_CT_IS_REPLY?

good catch. Committing to svn now, patch for mainline added to my set of pending patches.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#2 lore raw

Hi,

2005-04-10, v keltezéssel 22.58-kor Harald Welte ezt írta:

Quoted 8 lines · Alexander Stieglecker
Quoted 7 lines

/* special case: ICMP error handling. conntrack distinguishes between
* error messages (RELATED) and information requests (see below) */
if ((*pskb)->nh.iph->protocol == IPPROTO_ICMP

    && (ctinfo == IP_CT_RELATED 
	|| ctinfo == IP_CT_IS_REPLY+IP_CT_IS_REPLY))
	return IPT_CONTINUE;
Quoted 5 lines
Quoted 2 lines

IP_CT_IS_REPLY+IP_CT_IS_REPLY equals six which is greater than IP_CT_NUMBER. Shouldn't it be something like IP_CT_IS_RELATED+IP_CT_IS_REPLY?

good catch. Committing to svn now, patch for mainline added to my set of pending patches.

Harald, I'm afraid the fix you committed to svn isn't perfect (does
not compile.) Shouldn't that be IP_CT_RELATED instead of IP_CT_IS_RELATED?

Signature · 2 lines
 Regards,
  Krisztian Kovacs
#3 lore raw
Quoted 3 lines · KOVACS Krisztian

Harald, I'm afraid the fix you committed to svn isn't perfect (does
not compile.) Shouldn't that be IP_CT_RELATED instead of IP_CT_IS_RELATED?

thanks, fixed.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie