On Thu, 20 Apr 2000, Sarel J. Botha wrote:

|On Thu, Apr 20, 2000 at 12:23:53PM -0500, Clifford Kite wrote:
|> Starting with ppp-2.3.9 the pppd noipdefault option causes the local IP
|> address used in the pppd IP address option to be ignored.  In the PPP IPCP
|> negotiations pppd uses 0.0.0.0 instead of the specified local IP address.
|> The local address *is* use in IPCP negotiations when the noipdefault option
|> is removed.  Can anyone say whether this is a feature or a small bug? 
|
|I would say it's a feature. Firstly, it makes sense, but secondly, on line
|452 in ipcp.c in pppd-2.3.11 there is this:
|
|  if (wo->ouraddr == 0 || disable_defaultip)
|    wo->accept_local = 1;
|
|The bit that matters is "|| disable_defaultip" and it was definitely not
|put there by accident.

Yes, and thanks for steering me to this, but I'm not sure it is the
applicable code.  This appears to me to say "if the local IP address
specified is 0 or the noipdefault option is in place, then pppd will
accept a local address from the peer."  That is not the same as pppd
ignoring a local address specified in the IP address option and using
0.0.0.0 instead in it's opening IPCP request.

Still, this code change first appeared in 2.3.9 too and it's not
clear why, since, if it applied by virtue of the noipdefault option,
then pppd would be forced to accept the peer's idea of the local IP
address that pppd is to use for the PPP connection, *even if pppd has
a local IP address specified as an option.*  What's the point of that?

The code that I think applies to my question appears a few lines later:

    if (disable_defaultip)
        go->ouraddr = 0;

which seems to override the local IP address in the pppd option
when the noipdefault option is present, zeroing the local IP address
and causing the behavior I described.  That is, a local IP address
specified in the pppd options is "ignored" when the noipdefault option
is present.  The result is almost the same as the code you posted:
pppd is forced to accept a local IP address that the peer offers.
However, the IPCP negotiations show which code causes that to happen,
since pppd requests 0.0.0.0 rather than requesting an option-specified
local IP address and then negotiating it away.

This is a problem for people that previously specified the local
IP address and noipdefault.  It seems clear that they viewed the
noipdefault option as a measure to prevent pppd from overriding an
option-specified local IP address with an IP address obtained from a
local network interface.  That's the way I always viewed it, and it
would be nice to be able to explain to those people why the change
was desirable.

But I can't see any good reason for the change from the behavior of
pppd versions 2.3.8 and lower, which was to negotiate IPCP starting
with the local address when it was specified, regardless of whether
the noipdefault option is present or not.  That behavior seems more
appropriate to me.

If someone can think of a reason that would justify these changes
then I'd like to hear from you.

---
Clifford Kite                                               Not a guru. (tm)












-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to