From owner-freebsd-net Thu Jun 15 7:53:34 2000 Delivered-To: freebsd-net@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id A144337BB84; Thu, 15 Jun 2000 07:52:14 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.9.3/1.13) id RAA16413; Thu, 15 Jun 2000 17:51:15 +0300 (EEST) Date: Thu, 15 Jun 2000 17:51:15 +0300 From: Ruslan Ermilov To: Erik Salander Cc: net@FreeBSD.org, Archie Cobbs , Julian Elischer , Brian Somers , Charles Mott Subject: Re: libalias changes for PPTP, RTSP, FTP(passive) Message-ID: <20000615175115.A13791@sunbay.com> Mail-Followup-To: Erik Salander , net@FreeBSD.org, Archie Cobbs , Julian Elischer , Brian Somers , Charles Mott References: <392C655B.5966AE30@whistle.com> <20000614145957.A83146@sunbay.com> <3947CC8F.8D755E78@whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3947CC8F.8D755E78@whistle.com>; from erik@whistle.com on Wed, Jun 14, 2000 at 11:18:55AM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Jun 14, 2000 at 11:18:55AM -0700, Erik Salander wrote: > Ruslan Ermilov wrote: > [...] > About outgoing GRE translation... A session is defined by a triple (PAC, PNS, > Call ID). But it's not (necessarily) the same triple at the PAC as it is at > the PNS. They'll each have their own individually obtained Call ID. > Theoretically, could be the same value. So when we have an outgoing GRE, it's > the destination's Call ID. I refer to it as the "other guy's" Call ID, not > ours to translate. > Okay, I understand. I have modified PPTP part of the patch and want you to review and test it. After that I could commit it. Unfortunately, I do not have enough test environment here, so additional testers are highly welcome. What has been modified (in short): - All PPTP related stuff including `struct grehdr' has been moved into alias_pptp.c. - LINK_GRE was renamed to LINK_PPTP to allow IPPROTO_GRE (but non-PPTP) links to co-exist, see below. - GreAliasIn() now uses two PPTP interface functions: PptpGetCallID() and PptpSetCallID() instead of explicitly manipulating GRE packets. PptpGetCallID() ensures that the passed packet is actually PPTP GRE packet by checking GRE header version and presence of Key field. Otherwise, GreAliasIn() defaults to ProtoAliasIn(). This should allow for PPTP GRE to co-exist with other GRE protocols. - AliasHandlePptp*() now use FindPptp*() instead of FindUdpTcp*(). The problem was that links were added with zero dst_port, and that caused them to be always LINK_PARTIALLY_SPECIFIED. Now PPTP links use NO_DEST_PORT as dst_port. As a side effect, there is no more need to check for link to be of type LINK_TCP or LINK_UDP in GetNewPort(), but I decided to let it be :-) - I also added checks for return values from FindPptp*() from within AliasHandlePptp*(). Before this, incoming PPTP (port 1723) packet could cause a NULL pointer dereference problem if running with PKT_ALIAS_DENY_INCOMING. I have put the patch against the -current libalias sources here: http://people.FreeBSD.org/~ru/libalias.pptp_patch.1.gz Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message