Fix spelling of "Protocol"

Signed-off-by: Paul Mackerras <paulus@samba.org>
Accept ms-wins settings provided by server

The PPP servers of some UMTS/HSPA modems, including the Huawei E220
and E620, will send WINS server settings and insist that the client
accepts these. If the client does not do so, the modem will sometimes
provide bogus DNS server addresses like 10.11.12.13 and 10.11.12.14.

If we receive ms-wins settings from the server, save and include them
in our ConfReqs.

See also discussions at

  http://thread.gmane.org/gmane.linux.ppp/2721
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445711

[paulus@samba.org: In fact what seems to happen is that the modem naks
IPCP conf-reqs with bogus values until it manages to communicate on the
network.  It's not clear that asking for the ms-wins stuff is essential
but it seems that sometimes it helps.]

Signed-off-by: Marcus Better <marcus@better.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Increase default IPCP Conf-Nak limit

Some 3G modems use IPCP Conf-Naks with the same values as we requested
as a way to delay the negotiation until they have contacted a server
over their radio network.  This increases the default value for the
ipcp-max-failure option from 5 to 100 so that we don't give up too
easily when this is happening.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Specify the device name on the default route deletion

Some users have reported that pppd will delete a default route
through another device, for example if they bring up a ppp connection
with default route, then bring up an ethernet interface and set a
default route through that, then take down the ppp connection.

This fixes it, for Linux at least, by specifying the device name on
the default route deletion ioctl, which means that the kernel will
only delete default routes through that device.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Update README and patchlevel date for 2.4.5 release

Signed-off-by: Paul Mackerras <paulus@samba.org>
Document +ipv6 and ipv6cp-accept-local

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Install pppol2tp plugins with sane permissions

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd: Terminate correctly if lcp_lowerup delayed calling fsm_lowerup

Cameron Hutchison noticed that if pppd gets asked to terminate the
link in the period between when lcp_lowerup() is called and when
fsm_lowerup() is called from lcp_delayed_up() (i.e. when listen_time
is non-zero), pppd never exits.

The reason is that lcp_close() doesn't handle the delayed-up case
properly.  Since the FSM is still in STOPPED state, we don't call
lcp_finished() and therefore never exit the main event loop.

This fixes it by handling the delayed-up case in lcp_close() as if
we had done the lowerup but the OPT_SILENT bit was set.  We use the
silent case because we don't want to actually send a configure-request
at this point.

Signed-off-by: Paul Mackerras <paulus@samba.org>
rp_pppoe: Copy acName and pppd_pppoe_service after option parsing

At present, the access concentrator name (acName) and service name
(pppd_pppoe_service) are set by option parsing, but are used at the
point of PPPOEInitDevice(), which gets called when the ethernet
device name is seen.  So if the rp_pppoe_service or rp_pppoe_ac
options appear after the device name, they are ignored.

This fixes it by using acName and pppd_pppoe_service in
PPPOEConnectDevice, which gets called after all options have been
parsed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
support no-mmu systems that lack fork()

Running Linux on a no-mmu processor requires a few considerations.  In the
case of ppp, we cannot fork(), nor can the child return from the function
it forks, nor can the child free up shared memory.

This patch boils down to:
 - a new -DNOMMU flag
 - do not free memory in child
 - do not return from forked function ... pass in function and its
   arguments for the child to call itself
 - call _exit() rather than exit()

Signed-off-by: Mike Frysinger <vapier@gentoo.org>