]> git.ozlabs.org Git - ppp.git/log
ppp.git
15 years agoUpdate READMEs etc. for the forthcoming ppp-2.4.5 release
Paul Mackerras [Sat, 6 Sep 2008 08:42:27 +0000 (18:42 +1000)]
Update READMEs etc. for the forthcoming ppp-2.4.5 release

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoRemove old Linux kernel MPPE stuff
Paul Mackerras [Sat, 30 Aug 2008 00:06:50 +0000 (10:06 +1000)]
Remove old Linux kernel MPPE stuff

This is all upstream in Linus' kernel tree now, so there's no longer
any need to have it here.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoFix the argument type in call to MD5_Update properly
Paul Mackerras [Sun, 24 Aug 2008 07:12:02 +0000 (17:12 +1000)]
Fix the argument type in call to MD5_Update properly

The secret needs to be cast to u_char * not char *.  Oops.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoSquish a few more char vs unsigned char warnings
Paul Mackerras [Tue, 19 Aug 2008 23:26:24 +0000 (09:26 +1000)]
Squish a few more char vs unsigned char warnings

These arose when I made the MD5 functions have proper prototypes.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoRemove various warnings, fix pppol2tp install
Paul Mackerras [Tue, 19 Aug 2008 11:25:58 +0000 (21:25 +1000)]
Remove various warnings, fix pppol2tp install

This fixes a collection of minor things that were resulting in
harmless warnings (accidental trigraphs, missing prototypes,
signed/unsigned char being used interchangeably) and corrects
an error in the pppol2tp makefile, which meant that it wasn't
installing anything.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoFix build error in the rp-pppoe plugin
Paul Mackerras [Mon, 18 Aug 2008 12:30:27 +0000 (22:30 +1000)]
Fix build error in the rp-pppoe plugin

We have the wrong -I path so we weren't getting the if_ppp.h from
include/linux.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoRemove more stuff that we don't need to distribute
Paul Mackerras [Mon, 18 Aug 2008 12:21:18 +0000 (22:21 +1000)]
Remove more stuff that we don't need to distribute

This removes some files from include/linux that any halfway-modern
distro will have under /usr/include, and removes the stuff from the
linux/ directory that we haven't included in the tarballs for ages.
This also moves some MPPE macros from include/{linux,net}/ppp-comp.h
to a new pppd/mppe.h.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoRemove files that don't go into releases
Paul Mackerras [Sun, 27 Jul 2008 12:23:45 +0000 (22:23 +1000)]
Remove files that don't go into releases

This mainly removes files specific to platforms that we no longer support,
and removes a few other outdated files.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoGet the repository a bit closer to what will be released
Paul Mackerras [Sun, 27 Jul 2008 07:28:29 +0000 (17:28 +1000)]
Get the repository a bit closer to what will be released

* Remove .cvsignore files and create .gitignore files where needed
* Add files that were in the last release but not in CVS

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoClear hungup in start_link() instead of connect_tty()
Paul Mackerras [Tue, 1 Jul 2008 12:27:56 +0000 (12:27 +0000)]
Clear hungup in start_link() instead of connect_tty()

Since hungup gets set in get_input(), which is generic, but only
cleared in connect_tty(), which is specific to the tty channel type,
other channel types were showing various problems on the second and
subsequent connections when the persist option was used.  This fixes
it by clearing hungup in start_link() rather than connect_tty().

15 years agoFix behaviour of maxoctets option when limit >= 2G
Paul Mackerras [Wed, 25 Jun 2008 10:30:36 +0000 (10:30 +0000)]
Fix behaviour of maxoctets option when limit >= 2G

Patch from Serhij Stasyuk with a minor modification by me.

15 years agoRemove send/recv_config_pppoa
Paul Mackerras [Mon, 23 Jun 2008 12:27:39 +0000 (12:27 +0000)]
Remove send/recv_config_pppoa

Plugins have no business to be setting the ppp interface mtu.
The send/recv_config functions are only meant to set the channel
mtu/mru, not the ppp interface mtu/mru.

15 years agoMake the pppoatm plugin's Makefile honour INSTROOT
Paul Mackerras [Mon, 23 Jun 2008 11:53:00 +0000 (11:53 +0000)]
Make the pppoatm plugin's Makefile honour INSTROOT

15 years agoOnly kill the whole process group if we have detached
Paul Mackerras [Mon, 23 Jun 2008 11:47:18 +0000 (11:47 +0000)]
Only kill the whole process group if we have detached

Previously we always sent a signal to the whole of our current process
group when we got a signal such as SIGINT or SIGTERM.  That's OK if
we have detached, because then we have our own process group, but not
if we haven't, because there might be other processes in our process
group that we don't know about.  In the latter case we now just send
the signal individually to the child processes that we have forked off
to run things like the connect script, charshunt or pty command.

15 years agoFlush the tty when welcomer or connector fails
Paul Mackerras [Mon, 23 Jun 2008 11:44:06 +0000 (11:44 +0000)]
Flush the tty when welcomer or connector fails

This avoids having the tcsetsf and the close of the tty device block
for long periods waiting for output to drain, as can happen if for
instance the serial port is in CRTSCTS mode and CTS is negated.

15 years agoRemoving hard-coded CC = gcc in a few Makefiles.
Paul Mackerras [Sun, 15 Jun 2008 11:04:14 +0000 (11:04 +0000)]
Removing hard-coded CC = gcc in a few Makefiles.

15 years agoAdd include/linux/if_pppol2tp.h, missed in a previous commit
Paul Mackerras [Sun, 15 Jun 2008 07:26:56 +0000 (07:26 +0000)]
Add include/linux/if_pppol2tp.h, missed in a previous commit

15 years agoAdd openl2tp plugin.
Paul Mackerras [Sun, 15 Jun 2008 07:26:19 +0000 (07:26 +0000)]
Add openl2tp plugin.

Patch from James Chapman.

This patch adds a plugin that lets OpenL2TP receive events from
pppd. It requires the pppol2tp plugin. Events are passed using a Unix
socket.

Signed-off-by: James Chapman <jchapman@katalix.com>
15 years agoAdd L2TP support.
Paul Mackerras [Sun, 15 Jun 2008 07:08:49 +0000 (07:08 +0000)]
Add L2TP support.

Patch from James Chapman.

This patch adds support for L2TP. It allows pppd to interface with the
pppol2tp driver in the Linux kernel. All data packets are handled by
the Linux kernel in order that the datapath be as efficient as
possible, while a userspace daemon implements the L2TP control
protocol, handling tunnel/session setup and teardown. The
implementation uses the PPPoX infrastructure; the architecture is
similar to PPPoE/PPPoATM in that a userspace daemon spawns a pppd
process per PPP session and uses a protocol-specific plugin to connect
pppd with the kernel.

The pppol2tp Linux kernel driver was integrated in the Linux kernel
from 2.6.23. For earlier kernels, an out of tree driver is available
from the pppol2tp-kmod package on the OpenL2TP project site at
http://sourceforge.net/projects/openl2tp.

Signed-off-by: James Chapman <jchapman@katalix.com>
15 years agoAdd the declaration of multilink_join_hook, missed in a previous commit.
Paul Mackerras [Sun, 15 Jun 2008 07:03:05 +0000 (07:03 +0000)]
Add the declaration of multilink_join_hook, missed in a previous commit.

15 years agoAdd a description of multilink_join_hook.
Paul Mackerras [Sun, 15 Jun 2008 07:02:18 +0000 (07:02 +0000)]
Add a description of multilink_join_hook.

15 years agoAdd multilink_join_hook, called when a links joins the bundle.
Paul Mackerras [Sun, 15 Jun 2008 06:56:12 +0000 (06:56 +0000)]
Add multilink_join_hook, called when a links joins the bundle.

Patch from James Chapman.

15 years agoMake pppd use blank username/password when explicitly specified
Paul Mackerras [Sun, 15 Jun 2008 06:53:06 +0000 (06:53 +0000)]
Make pppd use blank username/password when explicitly specified

Patch from Jon Dubovsky.

Previously pppd would use its default strategies for working out a
username and password/secret to use if the user gave the empty string
to the user and/or password options.  Now we set a flag when an
explicit username is given, and don't do the default username
calculation if the flag is set.  Similarly for the password.

15 years agoAdd pppoe-mac option to rp-pppoe plugin
Paul Mackerras [Sun, 15 Jun 2008 04:35:50 +0000 (04:35 +0000)]
Add pppoe-mac option to rp-pppoe plugin

This allows the user to specify the MAC address of the pppoe
server that s/he wishes to use.  With this option, pppd will
ignore PADO packets from any other MAC address.

15 years agoUpdates and fixes for the rp-pppoe plugin
Paul Mackerras [Mon, 9 Jun 2008 08:34:23 +0000 (08:34 +0000)]
Updates and fixes for the rp-pppoe plugin

1) Imported the good bits from the rp-pppoe-3.8 release.  This plugin
   was previously based on the 3.3 release.
2) Split apart the plugin from the pppoe-discovery program so that the
   plugin could use pppd functions such as error() rather than things
   like fprintf() and syslog().
3) Removed the stuff relating to DLPI and BPF, which isn't used on
   Linux; this plugin only works on Linux, and Solaris uses something
   quite different.
4) Added a PPPoE packet printer.
5) Removed several unused functions.
6) Instead of using bitfields for the 4-bit version and type fields
   in PPPoE packet headers, use a single 8-bit field and define macros
   to get the version and type fields out.  This eliminates any
   dependency on how the compiler lays out bitfields.
7) Sundry cleanups, such as removing unnecessary casts.
8) Last but by no means least, removed calls to exit() and die() so
   that the plugin doesn't exit, but returns an error where appropriate,
   so that the main pppd code can make the decisions about whether to
   exit or not.  (The plugin still exits if the specified interface is
   not a suitable sort of interface.)

15 years agoRewrite some code to avoid a type-punned pointer warning.
Paul Mackerras [Tue, 3 Jun 2008 12:07:13 +0000 (12:07 +0000)]
Rewrite some code to avoid a type-punned pointer warning.

15 years agoMinor tweaks to utils.c
Paul Mackerras [Tue, 3 Jun 2008 12:06:37 +0000 (12:06 +0000)]
Minor tweaks to utils.c

Add a const qualifier to the prefix arg for init_pr_log, and
use OUTCHAR in a couple of places in vslprintf instead of
explicitly putting things in the buffer.

15 years agoFix bug causing duplicate radius interim accounting messages (PR #1661)
Paul Mackerras [Mon, 26 May 2008 09:18:08 +0000 (09:18 +0000)]
Fix bug causing duplicate radius interim accounting messages (PR #1661)

This fixes a bug where we didn't cancel a timeout in the radius code
when the link goes down, leaving us with duplicate timeouts if it
comes back up again.  Bug report and patch from Richard Kojedzinszky.

15 years agoFix bug 1732 - using un-acked DNS settings
Paul Mackerras [Mon, 26 May 2008 08:33:22 +0000 (08:33 +0000)]
Fix bug 1732 - using un-acked DNS settings

This fixes a bug where we could end up using DNS settings that
were requested but nacked or rejected.  The problem was that ipcp_up
was only looking at go->dnsaddr, not at go->req_dns{1,2}.

16 years agoDescribe the noremoteip option.
Paul Mackerras [Wed, 26 Mar 2008 12:09:40 +0000 (12:09 +0000)]
Describe the noremoteip option.

16 years agoAllow operation without an IP address for the peer
Paul Mackerras [Wed, 26 Mar 2008 11:34:23 +0000 (11:34 +0000)]
Allow operation without an IP address for the peer

Under Linux, a point-to-point interface can operate without having
a destination IP address assigned to it, because routes can be
directed to the device rather than to a gateway IP address.  Some
peers expect us to operate in this manner and refuse to give us
an IP address for them, so this adds a new `noremoteip' option that
tells pppd not to ask for the peer's IP address if the peer doesn't
supply it.  There is also a `nosendip' option which tells pppd not
to supply its IP address -- mostly intended for testing.

Solaris requires a destination IP address, so the noremoteip option
is not included on Solaris.

16 years agoSome MS-DNS changes: if the peer sends a conf-nak prompting us
Paul Mackerras [Wed, 26 Mar 2008 10:57:11 +0000 (10:57 +0000)]
Some MS-DNS changes: if the peer sends a conf-nak prompting us
to ask for MS-DNS1 or MS-DNS2, do so; and also fix the code that
prints packets - it was printing "ms-dns3" rather than "ms-dns2".

16 years agoFixed uninitialized 'pw' variable in HAS_SHADOW logic in session.c due
James Carlson [Wed, 30 Jan 2008 14:26:53 +0000 (14:26 +0000)]
Fixed uninitialized 'pw' variable in HAS_SHADOW logic in session.c due
to flaw in initial integration.  Enabled HAS_SHADOW for Solaris, which
always has shadow password files.  Fixed all of pppd to compile with gcc
-Wall on Solaris.  (Still need fixes for kernel modules; blocking
Makedefs.gcc update.)  Tested with and without PAM, with gcc and Sun's
cc.

16 years agoFix some compile warnings and errors in the !USE_PAM case.
Paul Mackerras [Wed, 30 Jan 2008 05:24:04 +0000 (05:24 +0000)]
Fix some compile warnings and errors in the !USE_PAM case.

16 years agoRepaired MSLANMAN so that it doesn't drop core: need to pass offset into
James Carlson [Sat, 1 Dec 2007 20:10:51 +0000 (20:10 +0000)]
Repaired MSLANMAN so that it doesn't drop core: need to pass offset into
response array, not address of stack pointer.  (Broken in r1.34.)

16 years agoAdded net/ppp_defs.h to fix for compilation on Solaris, where u_int32_t
James Carlson [Sat, 1 Dec 2007 19:46:57 +0000 (19:46 +0000)]
Added net/ppp_defs.h to fix for compilation on Solaris, where u_int32_t
is not a standard type.  (Broken by r1.3.)

16 years agoAdded new "enable-session" option to enable session accounting and
James Carlson [Tue, 19 Jun 2007 02:08:35 +0000 (02:08 +0000)]
Added new "enable-session" option to enable session accounting and
logging without system-based authentication (works with all PPP
authentication types, including CHAP, unlike the "login" option), and
repaired misuse of wtmpx data in Solaris port.
Contributed by Diego Rivera <diego@rivera.net>.

17 years agoFix bug causing segfault on tdb errors.
Paul Mackerras [Tue, 19 Dec 2006 10:22:11 +0000 (10:22 +0000)]
Fix bug causing segfault on tdb errors.

We were calling tdb_error where we should have called tdb_errorstr.
Patch from Or Goshen.

17 years agoAdd extra baud rates >= 1Mbaud.
Paul Mackerras [Tue, 19 Dec 2006 10:10:23 +0000 (10:10 +0000)]
Add extra baud rates >= 1Mbaud.

Patch from Tim Davies.

17 years agoFix bug in CHAP MS v2 handling where we didn't zero enough.
Paul Mackerras [Tue, 19 Dec 2006 08:38:14 +0000 (08:38 +0000)]
Fix bug in CHAP MS v2 handling where we didn't zero enough.

Changing the response parameter of the ChapMS2 function to an
unsigned char * meant that using sizeof(*response) in a BZERO call
was no longer correct.  Instead we need to use MS_CHAP2_RESPONSE_LEN.
Patch from Guillaume Knispel.

17 years agoFix problem with fd 0 getting closed unintentionally by closelog.
Paul Mackerras [Tue, 19 Dec 2006 07:48:19 +0000 (07:48 +0000)]
Fix problem with fd 0 getting closed unintentionally by closelog.

Patch from Alan Curry in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=298582.

Basically, openlog was getting fd 0 for the log in some circumstances,
and safe_fork() was doing closelog after getting the desired stdin
dup'd to fd 0.  This fixes it by doing the closelog a little earlier.

17 years agoUpdate patchlevel date
Paul Mackerras [Wed, 28 Jun 2006 00:21:23 +0000 (00:21 +0000)]
Update patchlevel date

17 years agoRestore original EUID rather than 0 during option processing.
Paul Mackerras [Sun, 18 Jun 2006 11:26:00 +0000 (11:26 +0000)]
Restore original EUID rather than 0 during option processing.

When dropping and regaining privileges during option processing,
the seteuid to regain privileges is now the original EUID rather
than a constant zero.  This means that `pppd --version' run without
root privilege prints the version number and exits rather than
giving an "unable to regain privileges" error.

17 years agoNote pppd's behaviour regarding sending signals to its process group.
Paul Mackerras [Fri, 16 Jun 2006 00:01:23 +0000 (00:01 +0000)]
Note pppd's behaviour regarding sending signals to its process group.

17 years agoFix obvious subscript-out-of-range error.
Paul Mackerras [Thu, 15 Jun 2006 23:58:41 +0000 (23:58 +0000)]
Fix obvious subscript-out-of-range error.
Patch from Thomas Woerner via Robert Vogelgesang.

17 years agoPut back a "0" that got deleted somehow. I blame the cat. :)
Paul Mackerras [Sun, 4 Jun 2006 21:56:31 +0000 (21:56 +0000)]
Put back a "0" that got deleted somehow.  I blame the cat. :)

17 years agoCheck the result of seteuid(), just to be paranoid.
Paul Mackerras [Sun, 4 Jun 2006 07:04:57 +0000 (07:04 +0000)]
Check the result of seteuid(), just to be paranoid.

17 years agoCheck the return value of setuid, and make sure that it worked.
Paul Mackerras [Sun, 4 Jun 2006 07:02:37 +0000 (07:02 +0000)]
Check the return value of setuid, and make sure that it worked.
Fixes CVE-2006-2194.

17 years agoAdd $(INSTDIR) to installation paths in Linux makefiles.
Paul Mackerras [Sun, 4 Jun 2006 05:07:46 +0000 (05:07 +0000)]
Add $(INSTDIR) to installation paths in Linux makefiles.
Patch from Robert Vogelgesang.

This patch re-introduces the possibility for package maintainers to
install into a different filesystem tree. This is done by adding
$(INSTROOT) at various places; the package maintainers can then
issue a

        make install INSTROOT=/some/where/else

when they package pppd for their distribution.  In previous versions
of the ppp package this was possible using the variable DESTDIR, but
this variable is now used for a different purpose and cannot be
changed via additional parameters of the make command.

17 years agoFix snafu in run_program(). Patch from Robert Vogelgesang.
Paul Mackerras [Sun, 4 Jun 2006 03:52:50 +0000 (03:52 +0000)]
Fix snafu in run_program().  Patch from Robert Vogelgesang.

This patch splits out the major part of reap_kids() into a new
function, forget_child(), and calls this new function instead of
reap_kids() in run_program(), after having waitpid()'ed for a child.

Rationale:
The waitpid() at the start of reap_kids() has no chance to get the
PID of the child already waited for in run_program().
As a consequence, the PID of that child will stay in the list of all
children until the end of the pppd process, which is bad, because
pppd will then try to kill -TERM that PID (and might kill some
innocent third party at this point).

17 years agoUpdate for 2.4.4 release
Paul Mackerras [Mon, 29 May 2006 23:51:29 +0000 (23:51 +0000)]
Update for 2.4.4 release

17 years agoRemove name checks in the rp-pppoe plugin PPPoEDevnameHook function.
Paul Mackerras [Mon, 29 May 2006 23:29:16 +0000 (23:29 +0000)]
Remove name checks in the rp-pppoe plugin PPPoEDevnameHook function.
Based on a patch from Alin Nastac.  I also made the function only
set the device name and initialize the channel if `doit' is set.

17 years agoMake MANDIR directory if not present.
Paul Mackerras [Mon, 22 May 2006 00:16:57 +0000 (00:16 +0000)]
Make MANDIR directory if not present.
Patch from Robert Vogelgesang.

17 years agoThis enables plugins called via hooks/notifiers triggered
Paul Mackerras [Mon, 22 May 2006 00:04:07 +0000 (00:04 +0000)]
This enables plugins called via hooks/notifiers triggered
by the calls to lcp_close() to see the changed "status" value.
Otherwise (i. e. without this patch) the RADIUS plugin cannot set
the attribute PW_ACCT_TERMINATE_CAUSE to the appropriate values.
Patch from Robert Vogelgesang.

17 years agoThis fixes the RADIUS accounting termination cause when
Paul Mackerras [Mon, 22 May 2006 00:01:40 +0000 (00:01 +0000)]
This fixes the RADIUS accounting termination cause when
callback is negotiated via CBCP (report PW_CALLBACK instead of
the default PW_NAS_ERROR).
Patch from Robert Vogelgesang.

17 years agoPass -q option to modprobe, as suggested in PR#1373
Paul Mackerras [Sun, 21 May 2006 12:45:59 +0000 (12:45 +0000)]
Pass -q option to modprobe, as suggested in PR#1373

17 years agoFix bug reported in PR#1302 - doing strtol on "E=..."
Paul Mackerras [Sun, 21 May 2006 11:56:40 +0000 (11:56 +0000)]
Fix bug reported in PR#1302 - doing strtol on "E=..."
Thanks to Daniel Weller for the patch.

17 years agoFix segfault when secret is exactly 32 bytes long.
Paul Mackerras [Sun, 21 May 2006 07:23:15 +0000 (07:23 +0000)]
Fix segfault when secret is exactly 32 bytes long.
Also fixed a potential problem with secrets longer than 64
bytes, and fixed some signed/unsigned warnings in chap_ms.c.

17 years agoAvoid bus errors from unaligned input to SHA1Update
Paul Mackerras [Sun, 21 May 2006 07:21:28 +0000 (07:21 +0000)]
Avoid bus errors from unaligned input to SHA1Update

18 years agoDon't mention radius twice in SUBDIRS
Paul Mackerras [Sun, 28 Aug 2005 23:11:50 +0000 (23:11 +0000)]
Don't mention radius twice in SUBDIRS

18 years agoUp-date.
Paul Mackerras [Sun, 28 Aug 2005 07:10:06 +0000 (07:10 +0000)]
Up-date.

18 years agoDefine DESTDIR when compiling under Solaris.
Paul Mackerras [Sun, 28 Aug 2005 06:49:12 +0000 (06:49 +0000)]
Define DESTDIR when compiling under Solaris.

18 years agoCreate the default route as a device route rather than a gateway route.
Paul Mackerras [Sun, 28 Aug 2005 05:23:26 +0000 (05:23 +0000)]
Create the default route as a device route rather than a gateway route.

18 years agoMake sure we call the channel's cleanup function.
Paul Mackerras [Sun, 28 Aug 2005 05:22:48 +0000 (05:22 +0000)]
Make sure we call the channel's cleanup function.
Without this we don't end up closing the pty slave.

18 years agoDescribe the nolock option in the man page.
Paul Mackerras [Sun, 28 Aug 2005 05:21:24 +0000 (05:21 +0000)]
Describe the nolock option in the man page.

18 years agoupdate for 2.4.4
Paul Mackerras [Fri, 26 Aug 2005 12:56:53 +0000 (12:56 +0000)]
update for 2.4.4

18 years agoDescribe the /etc/ppp/ip-pre-up script.
Paul Mackerras [Fri, 26 Aug 2005 00:06:35 +0000 (00:06 +0000)]
Describe the /etc/ppp/ip-pre-up script.

18 years agoAdded an /etc/ppp/ip-pre-up script, run before the interface
Paul Mackerras [Thu, 25 Aug 2005 23:59:34 +0000 (23:59 +0000)]
Added an /etc/ppp/ip-pre-up script, run before the interface
is brought up.  This necessitated adding a "wait" parameter to
run_program, since we need to wait for this script to finish
before proceeding.

18 years agoSet the outbound indicator on candidate dial-on-demand packets.
Paul Mackerras [Thu, 25 Aug 2005 12:14:18 +0000 (12:14 +0000)]
Set the outbound indicator on candidate dial-on-demand packets.
Bug pointed out by Alin Nastac.

18 years agoSome minor clarifications and amendments.
Paul Mackerras [Thu, 25 Aug 2005 12:10:18 +0000 (12:10 +0000)]
Some minor clarifications and amendments.

18 years agoDon't override the user's choice of mtu/mru < 1492,
Paul Mackerras [Thu, 25 Aug 2005 10:51:27 +0000 (10:51 +0000)]
Don't override the user's choice of mtu/mru < 1492,
and don't warn about the fact that pppoe can't do mru=1500.

18 years agoChange DLT_PPP_WITHDIRECTION to DLT_PPP_PPPD since that seems
Paul Mackerras [Wed, 13 Jul 2005 12:31:36 +0000 (12:31 +0000)]
Change DLT_PPP_WITHDIRECTION to DLT_PPP_PPPD since that seems
to be what libpcap has finally settled on.

18 years agoLog a message when we succeed or fail in authenticating ourselves
Paul Mackerras [Wed, 13 Jul 2005 10:41:58 +0000 (10:41 +0000)]
Log a message when we succeed or fail in authenticating ourselves
to the peer.  The message in the success case is printed in
auth_withpeer_success, but the message in the failure case is
printed by the caller of auth_withpeer_fail (since there are
many possible reasons for failure).

18 years agoUpdate with info about chap_verify_hook, which has replaced
Paul Mackerras [Tue, 12 Jul 2005 08:56:07 +0000 (08:56 +0000)]
Update with info about chap_verify_hook, which has replaced
chap_auth_hook.

18 years agoUpdate to 2.4.4b1
Paul Mackerras [Tue, 12 Jul 2005 07:45:15 +0000 (07:45 +0000)]
Update to 2.4.4b1

18 years agoClean up base64_encode a bit more.
Paul Mackerras [Tue, 12 Jul 2005 07:44:47 +0000 (07:44 +0000)]
Clean up base64_encode a bit more.

18 years agoAssume that we have libcrypt if we have /usr/include/crypt.h.
Paul Mackerras [Tue, 12 Jul 2005 01:50:23 +0000 (01:50 +0000)]
Assume that we have libcrypt if we have /usr/include/crypt.h.
This should fix linking on 64-bit architectures.

18 years agoStop the charshunt process after running the disconnector,
Paul Mackerras [Tue, 12 Jul 2005 01:09:05 +0000 (01:09 +0000)]
Stop the charshunt process after running the disconnector,
rather than immediately a signal is received.  With this change
we can send a SIGHUP to pppd and actually have it do the
LCP TermReq/TermAck exchange.

18 years agoBring up the link on an explicit call from main() rather than
Paul Mackerras [Tue, 12 Jul 2005 01:07:59 +0000 (01:07 +0000)]
Bring up the link on an explicit call from main() rather than
doing it in link_required().  With the old way, it was restarting
the link in the middle of link_terminated().

18 years agoAdd a bit more space to the output buffer for base64 encoding,
Paul Mackerras [Sun, 10 Jul 2005 11:43:25 +0000 (11:43 +0000)]
Add a bit more space to the output buffer for base64 encoding,
to prevent 4-character usernames getting truncated.

18 years agoGet the plugins from the right directory when DESTDIR isn't /usr.
Paul Mackerras [Sun, 10 Jul 2005 11:19:10 +0000 (11:19 +0000)]
Get the plugins from the right directory when DESTDIR isn't /usr.

18 years agoReturn the message from the radius server to the peer.
Paul Mackerras [Sun, 10 Jul 2005 10:28:55 +0000 (10:28 +0000)]
Return the message from the radius server to the peer.

18 years agoFix the rechallenge behaviour. Previously, once it sent a rechallenge,
Paul Mackerras [Sun, 10 Jul 2005 07:31:26 +0000 (07:31 +0000)]
Fix the rechallenge behaviour.  Previously, once it sent a rechallenge,
it would ignore the response (except to send a reply with a bogus
message) and retransmit the rechallenge every 3 seconds until it
eventually timed out and took down the link.

18 years agoDon't set the interface MTU in PPPOESendConfig, in fact get rid of
Paul Mackerras [Sat, 9 Jul 2005 09:12:48 +0000 (09:12 +0000)]
Don't set the interface MTU in PPPOESendConfig, in fact get rid of
it altogether, and instead set the wanted MRU and allowed MTU to
1492 before starting negotiation.

18 years agoClear the wtmp entry in plogout whether or not USE_PAM is defined,
Paul Mackerras [Sat, 9 Jul 2005 05:49:44 +0000 (05:49 +0000)]
Clear the wtmp entry in plogout whether or not USE_PAM is defined,
for symmetry with plogin, which creates it whether or not USE_PAM
is defined.

18 years agoFix the return value from setpassfilter and setactivefilter - it
Paul Mackerras [Sat, 9 Jul 2005 04:58:36 +0000 (04:58 +0000)]
Fix the return value from setpassfilter and setactivefilter - it
should be 1 if the value was OK or 0 if it wasn't.

18 years agoFixed kernel memory leaks reported by Jin Jiang along with some
James Carlson [Mon, 27 Jun 2005 00:59:57 +0000 (00:59 +0000)]
Fixed kernel memory leaks reported by Jin Jiang along with some
readability and commenting problems that led to the leaks.

18 years agoAdded support for x64 (AMD Opteron/Athlon and Intel EM64T) on Solaris
James Carlson [Sun, 26 Jun 2005 23:53:17 +0000 (23:53 +0000)]
Added support for x64 (AMD Opteron/Athlon and Intel EM64T) on Solaris
using Sun WorkShop or gcc.

18 years agoFixed configure breakage in $archvariant support for Solaris
James Carlson [Sun, 26 Jun 2005 19:34:41 +0000 (19:34 +0000)]
Fixed configure breakage in $archvariant support for Solaris
introduced by fix in RCS ID 1.33 -- failed to configure for WorkShop C
compiler correctly because test was changed from -f (file exists) to
"$archvariant" (variable is non-null).

Fixed ccp.c compilation warnings due to missing argument type in RCS
ID 1.48 fix.

18 years agoFix for Sun CR 6257917: the right prefix length for an interface token
James Carlson [Wed, 4 May 2005 21:31:20 +0000 (21:31 +0000)]
Fix for Sun CR 6257917: the right prefix length for an interface token
is 64 bits, not 10.  (10 came from the prefix length of a link-layer
address, but it's not actually used by SIOCSLIFADDR, so it wasn't right
in any case.)

19 years agoMake the description of the call option more verbose, and
Paul Mackerras [Tue, 22 Mar 2005 10:48:37 +0000 (10:48 +0000)]
Make the description of the call option more verbose, and
allegedly clearer.  From Marco D'Itri.

19 years agoFrom Marco D'Itri: fix for an earlier patch from him.
Paul Mackerras [Tue, 22 Mar 2005 10:27:07 +0000 (10:27 +0000)]
From Marco D'Itri: fix for an earlier patch from him.

19 years agoFrom Marco D'Itri.
Paul Mackerras [Tue, 22 Mar 2005 10:22:32 +0000 (10:22 +0000)]
From Marco D'Itri.

Apparently some French ISPs really send PADO packets from
multicast MAC addresses. :-(

19 years agoFrom Marco D'Itri.
Paul Mackerras [Tue, 22 Mar 2005 09:53:53 +0000 (09:53 +0000)]
From Marco D'Itri.

This is a fix for #294232.

If pppd recognized the peer not to ask for encryption in
his initial offer, it refused any further negotiation.

This change tells the peer using a ConfNak what
encryption options we're able to accept.
This makes the peer send a new ConfReq, usually with
one of the options we're able to accept.

19 years agoDo an lcp_close whenever the link terminates, not just if it
Paul Mackerras [Mon, 21 Mar 2005 09:20:16 +0000 (09:20 +0000)]
Do an lcp_close whenever the link terminates, not just if it
terminates because of an error.  This is needed for persist
to work properly.

19 years agoCall lcp_close(0) in link_required if the channel connect or
Paul Mackerras [Fri, 31 Dec 2004 11:58:56 +0000 (11:58 +0000)]
Call lcp_close(0) in link_required if the channel connect or
establish_ppp functions fail.  It's a bit grotty but it is needed
to get lcp back into closed state so that a future lcp_open will
do what it should.

19 years agoDon't close pty_slave and real_ttyfd in connect_tty if an error
Paul Mackerras [Fri, 31 Dec 2004 11:49:22 +0000 (11:49 +0000)]
Don't close pty_slave and real_ttyfd in connect_tty if an error
occurs; link_required calls cleanup_tty if connect_tty returns
an error, and that does the closing.  Doing the closes in connect_tty
meant that the disconnector couldn't run and the tty mode couldn't
be restored.

19 years agoDLT_PPP_WITH_DIRECTION should be DLT_PPP_WITHDIRECTION.
Paul Mackerras [Fri, 31 Dec 2004 06:19:27 +0000 (06:19 +0000)]
DLT_PPP_WITH_DIRECTION should be DLT_PPP_WITHDIRECTION.
Thanks to Stefan Petersen for pointing this out.

19 years agoGet rid of the MS_ChapResponse and MS_Chap2Response structures.
Paul Mackerras [Mon, 15 Nov 2004 22:13:26 +0000 (22:13 +0000)]
Get rid of the MS_ChapResponse and MS_Chap2Response structures.
Using a struct to represent an on-the-wire format is basically
broken, since the compiler can add padding between members or
assume alignment for the struct.  Instead we just use arrays
of unsigned char and define offsets in the arrays for the various
fields.

19 years agoCut down on spam from Solaris ppp kernel bits: unknown DLPI primitives
James Carlson [Mon, 15 Nov 2004 00:57:54 +0000 (00:57 +0000)]
Cut down on spam from Solaris ppp kernel bits: unknown DLPI primitives
(as encountered on Solaris 10) aren't errors, and need to flush out any
queued up (undecoded) data on the read side after pushing ppp_ahdlc.