Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2000 17:51:15 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Erik Salander <erik@whistle.com>
Cc:        net@FreeBSD.org, Archie Cobbs <archie@FreeBSD.org>, Julian Elischer <julian@FreeBSD.org>, Brian Somers <brian@FreeBSD.org>, Charles Mott <cmott@scientech.com>
Subject:   Re: libalias changes for PPTP, RTSP, FTP(passive)
Message-ID:  <20000615175115.A13791@sunbay.com>
In-Reply-To: <3947CC8F.8D755E78@whistle.com>; from erik@whistle.com on Wed, Jun 14, 2000 at 11:18:55AM -0700
References:  <392C655B.5966AE30@whistle.com> <20000614145957.A83146@sunbay.com> <3947CC8F.8D755E78@whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000615175115.A13791>