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
413d82a6fd
commit
5c7e7e80cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133121
@ -300,7 +300,7 @@ AliasVerifyPptp(struct ip *pip, u_int16_t * ptype)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
/* Move up to PPTP message header */
|
/* Move up to PPTP message header */
|
||||||
hptr = (PptpMsgHead) ip_next(pip);
|
hptr = (PptpMsgHead) tcp_next(tc);
|
||||||
|
|
||||||
/* Return the control message type */
|
/* Return the control message type */
|
||||||
*ptype = ntohs(hptr->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);
|
tlen = ntohs(pip->ip_len);
|
||||||
dlen = tlen - hlen;
|
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
|
* 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);
|
return (NULL);
|
||||||
|
|
||||||
/* Move up to PPTP message header */
|
/* Move up to PPTP message header */
|
||||||
hptr = (PptpMsgHead) ip_next(pip);
|
hptr = (PptpMsgHead) tcp_next(tc);
|
||||||
|
|
||||||
/* Return the control message type */
|
/* Return the control message type */
|
||||||
*ptype = ntohs(hptr->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);
|
tlen = ntohs(pip->ip_len);
|
||||||
dlen = tlen - hlen;
|
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
|
* XXX This direction is reserved for future use. I still need to
|
||||||
|
Loading…
Reference in New Issue
Block a user