From 5c7e7e80ccdf71f9d2cfe8864a449ac63ae16cc9 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Wed, 4 Aug 2004 15:17:08 +0000 Subject: [PATCH] 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 --- lib/libalias/alias_pptp.c | 2 +- lib/libalias/alias_skinny.c | 2 +- sys/netinet/libalias/alias_pptp.c | 2 +- sys/netinet/libalias/alias_skinny.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libalias/alias_pptp.c b/lib/libalias/alias_pptp.c index 174780fc29fe..05722b10813d 100644 --- a/lib/libalias/alias_pptp.c +++ b/lib/libalias/alias_pptp.c @@ -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); diff --git a/lib/libalias/alias_skinny.c b/lib/libalias/alias_skinny.c index fccecc6764bb..74c283c73cf1 100644 --- a/lib/libalias/alias_skinny.c +++ b/lib/libalias/alias_skinny.c @@ -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 diff --git a/sys/netinet/libalias/alias_pptp.c b/sys/netinet/libalias/alias_pptp.c index 174780fc29fe..05722b10813d 100644 --- a/sys/netinet/libalias/alias_pptp.c +++ b/sys/netinet/libalias/alias_pptp.c @@ -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); diff --git a/sys/netinet/libalias/alias_skinny.c b/sys/netinet/libalias/alias_skinny.c index fccecc6764bb..74c283c73cf1 100644 --- a/sys/netinet/libalias/alias_skinny.c +++ b/sys/netinet/libalias/alias_skinny.c @@ -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