From owner-freebsd-stable Thu Jun 15 6:50:51 2000 Delivered-To: freebsd-stable@freebsd.org Received: from web1401.mail.yahoo.com (web1401.mail.yahoo.com [128.11.23.165]) by hub.freebsd.org (Postfix) with SMTP id 9F8B837B779 for ; Thu, 15 Jun 2000 06:50:37 -0700 (PDT) (envelope-from gwq_uk@yahoo.com) Received: (qmail 28517 invoked by uid 60001); 15 Jun 2000 13:50:37 -0000 Message-ID: <20000615135037.28516.qmail@web1401.mail.yahoo.com> Received: from [195.107.47.212] by web1401.mail.yahoo.com; Thu, 15 Jun 2000 06:50:37 PDT Date: Thu, 15 Jun 2000 06:50:37 -0700 (PDT) From: =?iso-8859-1?q?Greg=20Quinlan?= Reply-To: gwq_uk@yahoo.com Subject: PPP bug! To: FreeBSD-Stable@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, If anyone is interested - I have been playing with multiple PPP links and found that a second PPP link will always adopt the same network mask as the first. if ppp0 has a network mask of 255.255.255.128 then the ppp1 will be given the same mask. If I try to set ppp1 with a different network mask of 255.255.0.0 (in the options file) pppd will return an error immediately that the 'netmask is invalid'. I can assure you IT IS NOT. Both dialup ppp links have destinctly separate ip addresses. The second ppp link does not even get to the dialout stage. I had a look at the code for pppd and it appears that a line in options.c program which I don't completely understand (~& does what? right-shift??) is to blame. if ((inet_aton(*argv, &mask)) == -1 || (netmask & ~mask.s_addr)) { fprintf(stderr, "Invalid netmask %s\n", *argv); return (0); } The silly thing is that pppd is just parsing the options file, it has not dialed and it has not obtained an ip address from the remote server for the second link, so how could the netmask be invalid, unless the first ppp link netmask determined what the next network mask should be!! I thought all ppp links were independant network connections!!! :) Likewise if I switch the order of the dialup links both links will be given 255.255.0.0 .... this is definately not what I want ... although I have both links working this way. I need two dialup links as one is used for a VPN and the other is just WWW-surfing!! So what can be done about it? Cheers Greg __________________________________________________ Do You Yahoo!? Yahoo! Photos -- now, 100 FREE prints! http://photos.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message