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:
parent
3226759811
commit
c8262f39d1
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user