Lines Matching +full:break +full:- +full:control

22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
82 if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL) in fingerprint()
83 return (-1); in fingerprint()
84 if (ntohs(*ah->dport) == PPTP_CONTROL_PORT_NUMBER in fingerprint()
85 || ntohs(*ah->sport) == PPTP_CONTROL_PORT_NUMBER) in fingerprint()
87 return (-1); in fingerprint()
99 AliasHandlePptpIn(la, pip, ah->lnk); in protohandlerin()
106 AliasHandlePptpOut(la, pip, ah->lnk); in protohandlerout()
113 if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY || in protohandlergrein()
116 return (-1); in protohandlergrein()
124 return (-1); in protohandlergreout()
173 break; in mod_handler()
177 break; in mod_handler()
199 Specifically, watch PPTP control messages and alias the Call ID or the
201 "de-aliasing" of incoming packets, this is different than any other
208 For this routine to work, the PPTP control messages must fit entirely
213 IRC and RTSP), the PPTP control messages that need to be aliased are
270 u_int16_t type; /* control message type */
292 struct alias_link *lnk) /* The PPTP control link */ in AliasHandlePptpOut()
297 u_int16_t ctl_type; /* control message type */ in AliasHandlePptpOut()
300 /* Verify valid PPTP control message */ in AliasHandlePptpOut()
312 * control message. in AliasHandlePptpOut()
315 GetAliasAddress(lnk), cptr->cid1); in AliasHandlePptpOut()
316 break; in AliasHandlePptpOut()
320 * Find PPTP link for address and Call ID found in control in AliasHandlePptpOut()
324 GetDestAddress(lnk), cptr->cid1); in AliasHandlePptpOut()
325 break; in AliasHandlePptpOut()
331 int accumulate = cptr->cid1; in AliasHandlePptpOut()
334 cptr->cid1 = GetAliasPort(pptp_lnk); in AliasHandlePptpOut()
338 accumulate -= cptr->cid1; in AliasHandlePptpOut()
339 ADJUST_CHECKSUM(accumulate, tc->th_sum); in AliasHandlePptpOut()
345 if (codes->resCode == 1) in AliasHandlePptpOut()
348 SetDestCallId(pptp_lnk, cptr->cid2); in AliasHandlePptpOut()
352 break; in AliasHandlePptpOut()
356 break; in AliasHandlePptpOut()
364 struct alias_link *lnk) /* The PPTP control link */ in AliasHandlePptpIn()
369 u_int16_t ctl_type; /* control message type */ in AliasHandlePptpIn()
372 /* Verify valid PPTP control message */ in AliasHandlePptpIn()
381 pcall_id = &cptr->cid1; in AliasHandlePptpIn()
382 break; in AliasHandlePptpIn()
385 pcall_id = &cptr->cid2; in AliasHandlePptpIn()
386 break; in AliasHandlePptpIn()
390 GetAliasAddress(lnk), cptr->cid1); in AliasHandlePptpIn()
398 /* Find PPTP link for address and Call ID found in PPTP Control Msg */ in AliasHandlePptpIn()
405 /* De-alias the Peer's Call Id. */ in AliasHandlePptpIn()
410 accumulate -= *pcall_id; in AliasHandlePptpIn()
411 ADJUST_CHECKSUM(accumulate, tc->th_sum); in AliasHandlePptpIn()
417 if (codes->resCode == 1) in AliasHandlePptpIn()
420 SetDestCallId(pptp_lnk, cptr->cid1); in AliasHandlePptpIn()
437 hlen = (pip->ip_hl + tc->th_off) << 2; in AliasVerifyPptp()
438 tlen = ntohs(pip->ip_len); in AliasVerifyPptp()
439 dlen = tlen - hlen; in AliasVerifyPptp()
448 /* Return the control message type */ in AliasVerifyPptp()
449 *ptype = ntohs(hptr->type); in AliasVerifyPptp()
451 /* Verify PPTP Control Message */ in AliasVerifyPptp()
452 if ((ntohs(hptr->msgType) != PPTP_CTRL_MSG_TYPE) || in AliasVerifyPptp()
453 (ntohl(hptr->magic) != PPTP_MAGIC)) in AliasVerifyPptp()
475 return (-1); in AliasHandlePptpGreOut()
477 lnk = FindPptpOutByPeerCallId(la, pip->ip_src, pip->ip_dst, gr->gh_call_id); in AliasHandlePptpGreOut()
482 DifferentialChecksum(&pip->ip_sum, in AliasHandlePptpGreOut()
483 &alias_addr, &pip->ip_src, 2); in AliasHandlePptpGreOut()
484 pip->ip_src = alias_addr; in AliasHandlePptpGreOut()
499 return (-1); in AliasHandlePptpGreIn()
501 lnk = FindPptpInByPeerCallId(la, pip->ip_src, pip->ip_dst, gr->gh_call_id); in AliasHandlePptpGreIn()
505 /* De-alias the Peer's Call Id. */ in AliasHandlePptpGreIn()
506 gr->gh_call_id = GetOriginalPort(lnk); in AliasHandlePptpGreIn()
509 DifferentialChecksum(&pip->ip_sum, in AliasHandlePptpGreIn()
510 &src_addr, &pip->ip_dst, 2); in AliasHandlePptpGreIn()
511 pip->ip_dst = src_addr; in AliasHandlePptpGreIn()