kernels/linux-2.4.0/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
/* Called when a new connection for this protocol found. */
Called when a new connection for this protocol found.
Called when a new connection for this protocol found .
static unsigned long icmp_new(struct ip_conntrack *conntrack,
			      struct iphdr *iph, size_t len)
{
	static u_int8_t valid_new[]
		= { [ICMP_ECHO] = 1,
		    [ICMP_TIMESTAMP] = 1,
		    [ICMP_INFO_REQUEST] = 1,
		    [ICMP_ADDRESS] = 1 };
	if (conntrack->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new)
	    || !valid_new[conntrack->tuplehash[0].tuple.dst.u.icmp.type]) {
		DEBUGP("icmp: can't create new conn with type %u\n",
		       conntrack->tuplehash[0].tuple.dst.u.icmp.type);
		DUMP_TUPLE(&conntrack->tuplehash[0].tuple);
		return 0;
	}
	return ICMP_TIMEOUT;
}
static unsigned long icmp_new ( struct ip_conntrack * conntrack , struct iphdr * iph , size_t len ) { static u_int8_t valid_new [ ] = { [ ICMP_ECHO ] = 1 , [ ICMP_TIMESTAMP ] = 1 , [ ICMP_INFO_REQUEST ] = 1 , [ ICMP_ADDRESS ] = 1 } ; if ( conntrack -> tuplehash [ 0 ] . tuple . dst . u . icmp . type >= sizeof ( valid_new ) || ! valid_new [ conntrack -> tuplehash [ 0 ] . tuple . dst . u . icmp . type ] ) { DEBUGP ( " \n " , conntrack -> tuplehash [ 0 ] . tuple . dst . u . icmp . type ) ; DUMP_TUPLE ( & conntrack -> tuplehash [ 0 ] . tuple ) ; return 0 ; } return ICMP_TIMEOUT ; }
Called when a new connection for this protocol found.
Called when a new connection for this protocol found .
/* Can't create a new ICMP `conn' with this. */