Fix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_next

functions.  Basically, the ip_next() function was used to get the PPTP and
Skinny headers when tcp_next() should have been used instead.  Symptoms of
this included a segfault in natd when trying to process a PPTP or Skinny
packet.

Approved by:	des
This commit is contained in:
marcus 2004-08-04 15:17:08 +00:00
parent 3226759811
commit c8262f39d1
4 changed files with 4 additions and 4 deletions

View File

@ -300,7 +300,7 @@ AliasVerifyPptp(struct ip *pip, u_int16_t * ptype)
return (NULL);
/* Move up to PPTP message header */
hptr = (PptpMsgHead) ip_next(pip);
hptr = (PptpMsgHead) tcp_next(tc);
/* Return the control message type */
*ptype = ntohs(hptr->type);

View File

@ -228,7 +228,7 @@ AliasHandleSkinny(struct libalias *la, struct ip *pip, struct alias_link *lnk)
tlen = ntohs(pip->ip_len);
dlen = tlen - hlen;
sd = (struct skinny_header *)ip_next(pip);
sd = (struct skinny_header *)tcp_next(tc);
/*
* XXX This direction is reserved for future use. I still need to

View File

@ -300,7 +300,7 @@ AliasVerifyPptp(struct ip *pip, u_int16_t * ptype)
return (NULL);
/* Move up to PPTP message header */
hptr = (PptpMsgHead) ip_next(pip);
hptr = (PptpMsgHead) tcp_next(tc);
/* Return the control message type */
*ptype = ntohs(hptr->type);

View File

@ -228,7 +228,7 @@ AliasHandleSkinny(struct libalias *la, struct ip *pip, struct alias_link *lnk)
tlen = ntohs(pip->ip_len);
dlen = tlen - hlen;
sd = (struct skinny_header *)ip_next(pip);
sd = (struct skinny_header *)tcp_next(tc);
/*
* XXX This direction is reserved for future use. I still need to