u_int16_t msg, *cid, *pcid; 
u_int16_t msg; __be16 *cid, *pcid; 
pptp_outbound_pkt(struct sk_buff **pskb,		  struct tcphdr *tcph,		  unsigned int nexthdr_off,		  unsigned int datalen,		  struct ip_conntrack *ct,		  enum ip_conntrack_info ctinfo){	struct PptpControlHeader _ctlh, *ctlh;	unsigned int reqlen;	union pptp_ctrl_union _pptpReq, *pptpReq;	struct ip_ct_pptp_master *info = &ct->help.ct_pptp_info;	u_int16_t msg, *cid, *pcid;	ctlh = skb_header_pointer(*pskb, nexthdr_off, sizeof(_ctlh), &_ctlh);	if (!ctlh)		return NF_ACCEPT;	nexthdr_off += sizeof(_ctlh);	datalen -= sizeof(_ctlh);		reqlen = datalen;	if (reqlen > sizeof(*pptpReq))		reqlen = sizeof(*pptpReq);	pptpReq = skb_header_pointer(*pskb, nexthdr_off, reqlen, &_pptpReq);	if (!pptpReq)		return NF_ACCEPT;	msg = ntohs(ctlh->messageType);	DEBUGP("outbound control message %s\n", pptp_msg_name[msg]);	switch (msg) {	case PPTP_START_SESSION_REQUEST:		/* client requests for new control session */		if (info->sstate != PPTP_SESSION_NONE) {			DEBUGP("%s but we already have one",				pptp_msg_name[msg]);		}		info->sstate = PPTP_SESSION_REQUESTED;		break;	case PPTP_STOP_SESSION_REQUEST:		/* client requests end of control session */		info->sstate = PPTP_SESSION_STOPREQ;		break;	case PPTP_OUT_CALL_REQUEST:		if (reqlen < sizeof(_pptpReq.ocreq)) {			DEBUGP("%s: short packet\n", pptp_msg_name[msg]);			/* FIXME: break; */		}		/* client initiating connection to server */		if (info->sstate != PPTP_SESSION_CONFIRMED) {			DEBUGP("%s but no session\n",				pptp_msg_name[msg]);			break;		}		info->cstate = PPTP_CALL_OUT_REQ;		/* track PNS call id */		cid = &pptpReq->ocreq.callID;		DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(*cid));		info->pns_call_id = ntohs(*cid);		break;	case PPTP_IN_CALL_REPLY:		if (reqlen < sizeof(_pptpReq.icack)) {			DEBUGP("%s: short packet\n", pptp_msg_name[msg]);			break;		}		/* client answers incoming call */		if (info->cstate != PPTP_CALL_IN_REQ		    && info->cstate != PPTP_CALL_IN_REP) {			DEBUGP("%s without incall_req\n", 				pptp_msg_name[msg]);			break;		}		if (pptpReq->icack.resultCode != PPTP_INCALL_ACCEPT) {			info->cstate = PPTP_CALL_NONE;			break;		}		pcid = &pptpReq->icack.peersCallID;		if (info->pac_call_id != ntohs(*pcid)) {			DEBUGP("%s for unknown call %u\n", 				pptp_msg_name[msg], ntohs(*pcid));			break;		}		DEBUGP("%s, CID=%X\n", pptp_msg_name[msg], ntohs(*pcid));		/* part two of the three-way handshake */		info->cstate = PPTP_CALL_IN_REP;		info->pns_call_id = ntohs(pptpReq->icack.callID);		break;	case PPTP_CALL_CLEAR_REQUEST:		/* client requests hangup of call */		if (info->sstate != PPTP_SESSION_CONFIRMED) {			DEBUGP("CLEAR_CALL but no session\n");			break;		}		/* FUTURE: iterate over all calls and check if		 * call ID is valid.  We don't do this without newnat,		 * because we only know about last call */		info->cstate = PPTP_CALL_CLEAR_REQ;		break;	case PPTP_SET_LINK_INFO:		break;	case PPTP_ECHO_REQUEST:	case PPTP_ECHO_REPLY:		/* I don't have to explain these ;) */		break;	default:		DEBUGP("invalid %s (TY=%d)\n", (msg <= PPTP_MSG_MAX)? 			pptp_msg_name[msg]:pptp_msg_name[0], msg);		/* unknown: no need to create GRE masq table entry */		break;	}		if (ip_nat_pptp_hook_outbound)		return ip_nat_pptp_hook_outbound(pskb, ct, ctinfo, ctlh,						 pptpReq);	return NF_ACCEPT;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/67497205b12e3cb408259cc09b50c3a9d12cd935/ip_conntrack_helper_pptp.c/buggy/net/ipv4/netfilter/ip_conntrack_helper_pptp.c