ip_conntrack_event_cache(IPCT_STATUS, skb); 
static int sctp_packet(struct ip_conntrack *conntrack,		       const struct sk_buff *skb,		       enum ip_conntrack_info ctinfo){	enum sctp_conntrack newconntrack, oldsctpstate;	struct iphdr *iph = skb->nh.iph;	sctp_sctphdr_t _sctph, *sh;	sctp_chunkhdr_t _sch, *sch;	u_int32_t offset, count;	char map[256 / sizeof (char)] = {0};	DEBUGP(__FUNCTION__);	DEBUGP("\n");	sh = skb_header_pointer(skb, iph->ihl * 4, sizeof(_sctph), &_sctph);	if (sh == NULL)		return -1;	if (do_basic_checks(conntrack, skb, map) != 0)		return -1;	/* Check the verification tag (Sec 8.5) */	if (!test_bit(SCTP_CID_INIT, (void *)map)		&& !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, (void *)map)		&& !test_bit(SCTP_CID_COOKIE_ECHO, (void *)map)		&& !test_bit(SCTP_CID_ABORT, (void *)map)		&& !test_bit(SCTP_CID_SHUTDOWN_ACK, (void *)map)		&& (sh->vtag != conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])) {		DEBUGP("Verification tag check failed\n");		return -1;	}	oldsctpstate = newconntrack = SCTP_CONNTRACK_MAX;	for_each_sctp_chunk (skb, sch, _sch, offset, count) {		write_lock_bh(&sctp_lock);		/* Special cases of Verification tag check (Sec 8.5.1) */		if (sch->type == SCTP_CID_INIT) {			/* Sec 8.5.1 (A) */			if (sh->vtag != 0) {				write_unlock_bh(&sctp_lock);				return -1;			}		} else if (sch->type == SCTP_CID_ABORT) {			/* Sec 8.5.1 (B) */			if (!(sh->vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])				&& !(sh->vtag == conntrack->proto.sctp.vtag							[1 - CTINFO2DIR(ctinfo)])) {				write_unlock_bh(&sctp_lock);				return -1;			}		} else if (sch->type == SCTP_CID_SHUTDOWN_COMPLETE) {			/* Sec 8.5.1 (C) */			if (!(sh->vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])				&& !(sh->vtag == conntrack->proto.sctp.vtag							[1 - CTINFO2DIR(ctinfo)] 					&& (sch->flags & 1))) {				write_unlock_bh(&sctp_lock);				return -1;			}		} else if (sch->type == SCTP_CID_COOKIE_ECHO) {			/* Sec 8.5.1 (D) */			if (!(sh->vtag == conntrack->proto.sctp.vtag[CTINFO2DIR(ctinfo)])) {				write_unlock_bh(&sctp_lock);				return -1;			}		}		oldsctpstate = conntrack->proto.sctp.state;		newconntrack = new_state(CTINFO2DIR(ctinfo), oldsctpstate, sch->type);		/* Invalid */		if (newconntrack == SCTP_CONNTRACK_MAX) {			DEBUGP("ip_conntrack_sctp: Invalid dir=%i ctype=%u conntrack=%u\n",			       CTINFO2DIR(ctinfo), sch->type, oldsctpstate);			write_unlock_bh(&sctp_lock);			return -1;		}		/* If it is an INIT or an INIT ACK note down the vtag */		if (sch->type == SCTP_CID_INIT 			|| sch->type == SCTP_CID_INIT_ACK) {			sctp_inithdr_t _inithdr, *ih;			ih = skb_header_pointer(skb, offset + sizeof(sctp_chunkhdr_t),			                        sizeof(_inithdr), &_inithdr);			if (ih == NULL) {					write_unlock_bh(&sctp_lock);					return -1;			}			DEBUGP("Setting vtag %x for dir %d\n", 					ih->init_tag, !CTINFO2DIR(ctinfo));			conntrack->proto.sctp.vtag[!CTINFO2DIR(ctinfo)] = ih->init_tag;		}		conntrack->proto.sctp.state = newconntrack;		if (oldsctpstate != newconntrack)			ip_conntrack_event_cache(IPCT_PROTOINFO, skb);		write_unlock_bh(&sctp_lock);	}	ip_ct_refresh_acct(conntrack, ctinfo, skb, *sctp_timeouts[newconntrack]);	if (oldsctpstate == SCTP_CONNTRACK_COOKIE_ECHOED		&& CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY		&& newconntrack == SCTP_CONNTRACK_ESTABLISHED) {		DEBUGP("Setting assured bit\n");		set_bit(IPS_ASSURED_BIT, &conntrack->status);	}	return NF_ACCEPT;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8ddec7460d2f5db3ac35812c03676b1473d1d668/ip_conntrack_proto_sctp.c/buggy/net/ipv4/netfilter/ip_conntrack_proto_sctp.c