From owner-freebsd-net Thu Nov 22 15:30: 7 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 4E3CC37B416 for ; Thu, 22 Nov 2001 15:30:05 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id PAA37353; Thu, 22 Nov 2001 15:18:30 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id fAMNISk89377; Thu, 22 Nov 2001 15:18:28 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200111222318.fAMNISk89377@arch20m.dellroad.org> Subject: Re: Mpd 3.2: Error in pptp.c? In-Reply-To: <3BFD6E36.1020306@ii.uib.no> "from Trond Davidsen at Nov 22, 2001 10:29:26 pm" To: Trond Davidsen Date: Thu, 22 Nov 2001 15:18:28 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Trond Davidsen writes: > in the file pptp.c in function PptpHookUp about line 481: > > /* Get session info */ > memset(&self_addr, 0, sizeof(self_addr)); > self_addr.sin_family = AF_INET; > self_addr.sin_len = sizeof(self_addr); > peer_addr = self_addr; > > shouldn't peer_addr get it's own structure? When I insert logging after > this, self_addr and peer_addr is the same addres, which don't make any > sense to me. peer_addr is a separate structure. You're probably seeing the same IP address because you're using inet_ntoa() which returns a static buffer. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message