Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2000 06:50:37 -0700 (PDT)
From:      =?iso-8859-1?q?Greg=20Quinlan?= <gwq_uk@yahoo.com>
To:        FreeBSD-Stable@FreeBSD.org
Subject:   PPP bug!
Message-ID:  <20000615135037.28516.qmail@web1401.mail.yahoo.com>

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




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