Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 15:18:28 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        Trond Davidsen <trond.davidsen@ii.uib.no>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Mpd 3.2: Error in pptp.c?
Message-ID:  <200111222318.fAMNISk89377@arch20m.dellroad.org>
In-Reply-To: <3BFD6E36.1020306@ii.uib.no> "from Trond Davidsen at Nov 22, 2001 10:29:26 pm"

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




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