History log of /freebsd-current/usr.sbin/ppp/log.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 672eba24 24-Apr-2023 John Baldwin <jhb@FreeBSD.org>

ppp: Use valid prototypes for function declarations with no arguments.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39730


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# f2f5156f 07-Feb-2011 Brian Somers <brian@FreeBSD.org>

Add "iface name" and "iface description" commands.

PR: 151400
Submitted by: Aragon Gouveia - aragon at phat dot za dot net with minor fixes
MFC after: 3 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# e715b13b 16-Jul-2004 Brian Somers <brian@FreeBSD.org>

Support a ``set rad_alive N'' command to enable periodic RADIUS accounting
information being sent to the RADIUS server.

Logging of RADIUS accounting information moves to a ``set log [+-]radius''
level, along with the RADIUS alive info, and the version number is bumped
to 3.2 to reflect this.

Mostly submitted by: alx@sm.ukrtel.net (back in January)
MFC after: 3 weeks


# 10be78d3 15-Jun-2002 Brian Somers <brian@FreeBSD.org>

Remove whitespace at the end of lines.


# 46df5aa7 03-Nov-2001 Brian Somers <brian@FreeBSD.org>

Add a ``log'' command for logging specific information.
Add an ``UPTIME'' variable to indicate the bundle uptime.

It's now possible to put something like this in ppp.linkdown
for a server setup:

MYADDR:
log Session closing: User USER, address HISADDR, up UPTIME

Fixed some memory leakage with commands that expand words.
Made some functions static.
Fixed a diagnostic bug (iface add .... SIOCDIFADDR)


# 30949fd4 14-Aug-2001 Brian Somers <brian@FreeBSD.org>

o Add ipv6 support, abstracting most NCP addresses into opaque
structures (well, they're treated as opaque).

It's now possible to manage IPv6 interface addresses and routing
table entries and to filter IPV6 traffic whether encapsulated or
not.

IPV6CP support is crude for now, and hasn't been tested against
any other implementations.

RADIUS and IPv6 are independent of eachother for now.

ppp.linkup/ppp.linkdown aren't currently used by IPV6CP

o Understand all protocols(5) in filter rules rather than only a select
few.

o Allow a mask specification for the ``delete'' command. It's now
possible to specifically delete one of two conflicting routes.

o When creating and deleting proxy arp entries, do it for all IPv4
interface addresses rather than doing it just for the ``current''
peer address.

o When iface-alias isn't in effect, don't blow away manually (via ``iface
add'') added interface addresses.

o When listening on a tcp server (diagnostic) socket, bind so that a
tcp46 socket is created -- allowing both IPv4 and IPv6 connections.

o When displaying ICMP traffic, don't display the icmp type twice.
When display traffic, display at least some information about unrecognised
traffic.

o Bump version

Inspired after filtering work by: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>


# 90d25921 18-Jun-2001 Brian Somers <brian@FreeBSD.org>

Call va_start/va_end for each call to vfprintf

Obtained from: OpenBSD


# 7f03ca53 29-Oct-2000 Brian Somers <brian@FreeBSD.org>

Add ``all'' logging.

Submitted by: eivind


# 9b996792 29-Oct-2000 Brian Somers <brian@FreeBSD.org>

Various whitespace changes.
Make some functions static.


# 06a43ce0 28-Aug-2000 Brian Somers <brian@FreeBSD.org>

Add LogFILTER logging to log packets allowed by the dial filter and
dropped by any filter.

Submitted by: Mark Hannon <markhannon@one.net.au>

with some small tweaks by me.


# 52c9ca19 13-Mar-2000 Brian Somers <brian@FreeBSD.org>

Add ``set log dns'' to log DNS QUERY packets.

This is invaluable for dial-on-demand connections...
In ppp.linkup:

set log -dns -tcp/ip

and in ppp.linkdown

set log +dns +tcp/ip

giving a much better account of why the link came up.


# 182c898a 27-Dec-1999 Brian Somers <brian@FreeBSD.org>

Add a bunch of `const's and fix a typo.

Submitted by: Rich Neswold <rneswold@MCS.Net>


# 26af0ae9 20-Dec-1999 Brian Somers <brian@FreeBSD.org>

Cosmetic: Make struct mbuf more like kernel mbufs.


# b4f63b0b 06-Sep-1999 Brian Somers <brian@FreeBSD.org>

When logging warning messages, there are now three scenarios:
o If a prompt is executing the command, only display the warning to
that prompt
o If a prompt is executing a ``load'' command, display the warning
to all prompts *and* syslog
o Otherwise, display the warning to all prompts *and* syslog.


# 97d92980 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 9cf01ccf 08-Aug-1999 Brian Somers <brian@FreeBSD.org>

Don't log_Printf(..., buf) in case buf contains %s

Info provided by: Ollivier Robert <roberto@keltia.freenix.fr>


# ba16c840 01-Jun-1999 Brian Somers <brian@FreeBSD.org>

Make async/sync/physical/hdlc dumps prettier by showing printable
characters at the end of the line in hexdump style.


# 6815097b 12-May-1999 Brian Somers <brian@FreeBSD.org>

Allow ``host:port/udp'' devices and support ``host:port/tcp'' as
being the same as the previous (still supported) ``host:port''
syntax for tcp socket devices.

A udp device uses synchronous ppp rather than async, and avoids
the double-retransmit overhead that comes with ppp over tcp (it's
usually a bad idea to transport IP over a reliable transport that
itself is using an unreliable transport). PPP over UDP provides
througput of ** 1.5Mb per second ** with all compression disabled,
maxing out a PPro/200 when running ppp twice, back-to-back.

This proves that PPPoE is plausable in userland....

This change adds a few more handler functions to struct device and
allows derivations of struct device (which may contain their own
data etc) to pass themselves through the unix domain socket for MP.
** At last **, struct physical has lost all the tty crud !

iov2physical() is now smart enough to restore the correct stack of
layers so that MP servers will work again.

The version number has bumped as our MP link transfer contents have
changed (they now may contain a `struct device').

Don't extract the protocol twice in MP mode (resulting in protocol
rejects for every MP packet). This was broken with my original
layering changes.

Add ``Physical'' and ``Sync'' log levels for logging the relevent
raw packets and add protocol-tracking LogDEBUG stuff in various
LayerPush & LayerPull functions.

Assign our physical device name for incoming tcp connections by
calling getpeername().

Assign our physical device name for incoming udp connections from
the address retrieved by the first recvfrom().


# 3377c28c 09-May-1999 Brian Somers <brian@FreeBSD.org>

Deal with the fact that as we now mbuf_Read the fsm
header in fsm_Input() we often end up with a NULL mbuf.

Deal with a possible NULL mbuf being passed into
mbuf_Prepend().

Adjust some spacing to make things more consistent.


# a39fd214 07-Mar-1999 Brian Somers <brian@FreeBSD.org>

Correctly drop existing connections when reopening the diagnostic
socket.


# 9773f8c0 21-Aug-1998 Brian Somers <brian@FreeBSD.org>

Consolidate the two malloc()s that are done when allocating
an mbuf.


# bf1d3ff6 09-Aug-1998 Brian Somers <brian@FreeBSD.org>

When entering ``term'' mode, don't output any messages until
the device is successfully opened. If we fail to open it,
mention the fact.
Also go back into command mode as soon as the device is closed
rather than waiting for the user to type something before noticing.


# 92b09558 07-Aug-1998 Brian Somers <brian@FreeBSD.org>

o Support callback types NONE, E.164, AUTH and CBCP.
(see the new ``set callback'' and ``set cbcp'' commands)
o Add a ``cbcp'' log level and mbuf type.
o Don't dump core when \T is given in ``set login'' or
``set hangup''.
o Allow ``*'' and blanks as placeholders in ppp.secret and
allow a fifth field for specifying auth/cbcp dialback
parameters.
o Remove a few extraneous #includes
o Define the default number of REQs (restart counter) in defs.h
rather than hardcoding ``5'' all over the place.
o Fix a few man page inconsistencies.


# 0bdcbcbe 02-Aug-1998 Brian Somers <brian@FreeBSD.org>

PR: 7469
Be careful that the current or next prompt in the list
that we're iterating through doesn't get changed by
descriptor_Read().


# d93d3a9c 15-Jun-1998 Brian Somers <brian@FreeBSD.org>

o De-staticise things that don't need to be static.
o Bring the static ``ttystate'' into struct prompt so that
the tilde context is per prompt and not global.
o Comment the remaining static variables so that it's
clear why they're static.
o Add some XXX comments suggesting that our interface list
and our hostname should be re-generated after a signal
(say SIGUSR1) so that a machine with PCCARDs has a chance.


# c9e11a11 15-Jun-1998 Brian Somers <brian@FreeBSD.org>

Fix a rather nasty use of `static'. This caused a SEGV
when running ``link * load label'' as we ended up recursing
back into command_Interpret after nuking our command arg list.


# 1384bd27 28-May-1998 Brian Somers <brian@FreeBSD.org>

o #define the name "tun" in defs.h against the future possibility
of supporting architectures with different device names.
o Close /dev/tunX when destroying the bundle.
o Don't forget to close the parent end of the pipe in the child
process when exec'ing a program from a chat script.
o If we close our controlling terminal, ditch the current session
with it, allowing getty(8) (or whatever) to regain control.
o After transferring our controlling terminal descriptor to another
ppp instance, we now fork a new ppp to continue where we left off,
transferring ownership of all uucp locks and the /var/run/tunX.pid
file. Meanwhile the parent closes all file descriptors, defaults
all signals and does a pause() to wait for a HUP after the
transferred descriptor is finally closed.
We don't run /bin/cat any more (again!).

Suggested by: bde

TODO: It seems clocal devices need their pause()d session leader
to be given a manual HUP, as closing the last open descriptor
doesn't do the job.


# 0f2f3eb3 23-May-1998 Brian Somers <brian@FreeBSD.org>

o Move our prompt descriptor list outside of the bundle.
It's now dealt with by the `server' object. This simplifies
things as we only have one list of prompt descriptors and
the log_ routines check prompt::logactive to determine
whether it should be used for output.
o Include the MP socket UpdateSet() result in bundle::UpdateSet().
o Don't select on the tun device unless we're in NETWORK
phase or AUTO mode.
o Stop the idle timer when we go to DEAD phase. We may
have transferred a link and not had a chance to kill
it.
o Don't fail when trying to unlink our transferred datalink
from our descriptor lists just before the transfer.
o Add our link descriptor to the write set if we got a short
write the last time (physical::out is set).
o Log the connection source address when a connection is closed.
o Remove descriptor::next field. Descriptor lists are not required
any more.


# b1ac9332 01-May-1998 Brian Somers <brian@FreeBSD.org>

o Mention the ``timer'' log in the man page.
o Remove an escaped mention of ``carrier'' logging.
o Alphabeticalise timer logging in the log list.


# dd7e2610 01-May-1998 Brian Somers <brian@FreeBSD.org>

Cosmetic: Make our external function names consistent.


# 6f384573 30-Apr-1998 Brian Somers <brian@FreeBSD.org>

o Create a new ``timer'' log level. This lets us ``set
log debug'' without filling our filesystem/screen with
junk that we don't really want to see.
o change PHYS_STDIN to PHYS_DIRECT - we can handle incoming
connections that aren't on STDIN_FILENO now.
o Allow return values from our FSM LayerUp functions. If
LayerUp() fails, the FSM does an immediate FsmDown() without
calling the fsm_parent's Layer{Up,Down} functions.
o Clear the close-on-exec flag of file descriptor 3 when executing
chat programs so that our documented ability to communicate with
/dev/tty via that descriptor works. Also document it as
descriptor 3, not 4 :-O
o Allow a ``rm'' command as an alias for ``remove''.
o Fix the bind()/connect()/accept() calls made by the MP server.
o Create bundle_SendDatalink() and bundle_ReceiveDatalink().
This allows `struct datalink's to flatten themselves, pass
through a pipe (read: the eye of a needle !) and come alive
at the other end. The donator then fork()s & exec()s pppmpipe,
``passing'' the connection to another ppp instance.

*** PPP NOW TALKS MULTILINK :-))) ***

Our link utilization is hideous, and lots of code needs
tidying still. It's also probably riddled with bugs !
It's been tested against itself only, and has hung once,
so confidence isn't high....


# e43ebac1 25-Apr-1998 Brian Somers <brian@FreeBSD.org>

Make gcc-2.8.1 build ppp cleanly.
Support OpenBSD again.


# 643f4904 24-Apr-1998 Brian Somers <brian@FreeBSD.org>

o Defer setting up pap/chap based IP numbers & labels until after
we've determined if we're going to join another ppp invocation.
o Make ``show link'' show all link details, and ``show links''
just give a list of links and their current status.
o Show our current label in ``show bundle''.
o Allow link cloning and removal as soon as our MRRU is set.
o Make ``show lcp'' require context as nothing will ever change
in our MP LCP (it's auto-configured as per rfc1990).
o Initialise our LQM owner in hdlc_Init().
o Store our endpoint discriminator and authentication name at both
the datalink and multilink level and compare them when we've
finished AUTHENTICATE phase and before entering NETWORK phase.
If they don't match, close the link again.
Display the information in the appropriate ``show'' command.
o Initialise datalink::phone and datalink::fsmp.object properly
when we're cloning the link.
o Show which link we're passing LQRs on in our diagnostics.
o Reject endpoint discriminator REQs at the logical multilink
level.
o Remove the rest of our CARRIER and LINK logging setup.


# d47dceb8 24-Apr-1998 Brian Somers <brian@FreeBSD.org>

o Remove LINK level logging.
o change the default link name to ``deflink'' rather
than ``default''.
o Prepend the link name to CCP and LCP FSM diagnostics.
o Protect against 0 length options in CCP and IPCP REQ
interpreters (already done for LCP).
o Allow optional context for the `show' command.
o Use MPs link when interpreting commands if the multilink
mrru is configured rather than when multilink is active.
This means that once we've ``set mrru xxx'', we then need
to ``link deflink show ccp'' etc if we want to do link-level
stuff (based on the command requiring optional or manditory
context).
o Use the ifconfig'd interface address in `set enddisc {ip,mac}'
if it's there, otherwise the configuration file value.


# 25092092 14-Apr-1998 Brian Somers <brian@FreeBSD.org>

Pass all command arguments around with struct cmdargs rather
than incrementing argv and decrementing argc. Now individual
functions can determine their caller. This also removes the
"prefix" hack in FindExec().


# 565e35e5 10-Apr-1998 Brian Somers <brian@FreeBSD.org>

o Remove the `mode' global - it's now per physical device.
o Shuffle things that live at the datalink level into
``show link'' rather than ``show modem''.
o Make both ``show'' commands prettier and more consistent,
and display carrier status, link type and our name in
``show modem''.
o Show redial and reconnect information in ``show link''
and remove ``show redial'' and ``show reconnect''.
o Down the correct link in bundle_LinkLost().
o Remove stale -direct and -background links at the end
of our main loop, not when we know they're going. This
prevents unexpected pointer-invalidations...
o If we ``set server'' with the same values twice, notice
and don't moan about failure.
o Record dial script despite our link mode. The mode may
be changed later (next mod) :-) We never run scripts
in -direct and -dedicated modes.
o Make ``set server none'' functional again.
o Correct datalink state array so that we don't report an
``unknown'' state.
o Pass struct ipcp to IpcpCleanInterface, not struct fsm.
o Create TUN_PREFIX define rather than hard-coding in main.c
o prompt_TtyInit now handles a NULL prompt for -direct mode
rather than having to create one then destroy it uncleanly.
o Mention our mode in the "PPP Started" LogPHASE message.
o Bring all auto links up when we have something to send.
o Remove some redundant Physical_*() functions.
o Show which connection is running a command when logging
commands.
o Initialise throughput uptime correctly.


# 2764b86a 06-Apr-1998 Brian Somers <brian@FreeBSD.org>

o Move alias function pointers into loadalias.c
o Move Var*Version into command.c
o Remove struct pppVars (and there was much rejoicing) !
o Forward-decl some structs in .h files to avoid include
ordering requirements and remove a few more redundant
#includes.


# d24f017b 06-Apr-1998 Brian Somers <brian@FreeBSD.org>

Remove unused includes.


# f91ad6b0 05-Apr-1998 Brian Somers <brian@FreeBSD.org>

Make ^Z, bg & fg work. We don't muck around with
SIGTTIN or SIGTTOU, we just disable use of the prompt
for the controlling terminal (and put a ^Z next to it
in a ``show who'' listing).

Unfortunately, we need to enable a timer to ``poll''
for the terminal having us as the controlling pgrp
when a user does a ``bg''. If anyone knows how to
do this better - please speak up (is there any
indication to the process group leader when it's
ctrling terminal gets tcsetpgrp()'d back ?)....


# 67568487 03-Apr-1998 Brian Somers <brian@FreeBSD.org>

Correct `LogMaskLocal' when reducing the mask for a
given prompt rather than spamming other prompt masks.


# b6217683 03-Apr-1998 Brian Somers <brian@FreeBSD.org>

Deglobalise `struct prompt':
o Our diagnostic socket has its password set in the `set socket'
line only (not in ppp.secret).
o Passwords are per server socket (*VarAuthKey are gone)
o Authority is per prompt (VarLocalAuth is gone).
o Local logging is per prompt.
o Add a `show who' command to see who's connected. No identd
routine - just a `where the connection came from' display.
o SIGUSR1 is disabled for now - we have no way of choosing a
password for the socket created :-(

Prompts are attached as a list of `struct descriptor's in
struct bundle, and serviced under the bundles descriptor
service routines. Ultimately, everything should be done
like this.

Cosmetic:
o alphabeticalise SRCS in Makefile.
o Add a few comments in command.h

TODO: Start checking that we don't overflow the descriptor sets
in select() now that we can have any number of descriptors.


# 70a91e4c 12-Mar-1998 Brian Somers <brian@FreeBSD.org>

Add missing include


# 85b542cf 09-Feb-1998 Brian Somers <brian@FreeBSD.org>

Move the terminal/diagnostic socket stuff out of main.c
and into the new `prompt.c'. struct prompt is (of course)
a `sort' of descriptor.


# 1ae349f5 28-Jan-1998 cvs2svn <cvs2svn@FreeBSD.org>

This commit was manufactured by cvs2svn to create branch 'MP'.


# aa8e0519 20-Jan-1998 Brian Somers <brian@FreeBSD.org>

Remove unused #includes.
Make various bits static.
Remove unused variables.
Submitted by: eivind


# 70ee81ff 24-Dec-1997 Brian Somers <brian@FreeBSD.org>

Cosmetic (style):
sizeof(var) -> sizeof var
sizeof type -> sizeof(type)

Suggested by: J Wunsch <j@uriah.heep.sax.de>


# c39934ea 20-Dec-1997 Brian Somers <brian@FreeBSD.org>

Add (BSD) copyright headers.


# b6e82f33 21-Nov-1997 Brian Somers <brian@FreeBSD.org>

Fix prototypes.
Remove extraneous decls.
Add ``const'' to several places.
Allow ``make NOALIAS=1'' to remove IP aliasing.
Merge with OpenBSD - only the Makefiles vary.

We can now survive a compile with
-Wall -Wbad-function-cast -Wcast-align -Wcast-qual
-Winline -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wredundant-decls
-Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts
(although the Makefile just contains -Wall).


# 3aa7aa46 10-Nov-1997 Brian Somers <brian@FreeBSD.org>

Flush the output stream when doing local logging.


# 86e02934 09-Nov-1997 Brian Somers <brian@FreeBSD.org>

Increase chat script sizes to 512
Requested by: Michael Reifenberger <root@totum.plaut.de>


# 5106c671 08-Nov-1997 Brian Somers <brian@FreeBSD.org>

Introduce ID0 logging.
Stay as the invoking uid as much as possible.
Execution as a normal user is still forbidden for now,
so these changes are pretty ineffective.
The next commit will implement the modifications suggested
on -hackers a number of days ago.


# a1e8f937 03-Nov-1997 Brian Somers <brian@FreeBSD.org>

Introduce [local] to "set log [local] ...". This spits
logging out to the screen in terminal mode - should be
good for installation problem diagnosis.


# 75240ed1 25-Oct-1997 Brian Somers <brian@FreeBSD.org>

Cosmetic (no functional changes):
o Add missing $Id$s
o Move extern decls from .c -> .h files
o Staticize
o Remove #includes from .h files
o style(9)ify includes
o bcopy -> memcpy
bzero -> memset
bcmp -> memcmp
index -> strchr
rindex -> strrchr
o Move timeout.h -> timer.h (making it consistent w/ timer.c)
o Add -Wmissing-prototypes


# a9e8f807 21-Oct-1997 Brian Somers <brian@FreeBSD.org>

Fix HDLC logging (actually LogDumpBp()). It was only
outputting the first mbuf in the chain.


# 944f7098 24-Aug-1997 Brian Somers <brian@FreeBSD.org>

Make the code format more in line with style(9).
Update loadalias to use the new libalias api.
Update to version 1.1.


# cb611434 20-Aug-1997 Brian Somers <brian@FreeBSD.org>

Expand the "set stopped" command so that it can
idependently time out any of the FSMs.

Split LCP logging into LCP, IPCP and CCP logging,
and make room in "struct fsm" for the log level
that the state machine should use.


# 927145be 08-Jun-1997 Brian Somers <brian@FreeBSD.org>

Overhaul ppp:
o Use syslog
o Remove references to stdout/stderr (incl perror())
o Introduce VarTerm - the interactive terminal or zero
o Allow "set timeout" to affect current session
o Change "set debug" to "set log"
o Allow "set log [+|-]flag"
o Make MSEXT and PASSWDAUTH stuff the default
o Move all #ifdef DEBUG stuff into the code - this
shouldn't be too much overhead. It's now controlled
with "set log +debug"
o Add "set log command, debug, tun, warn, error, alert"
o Remove cdefs.h, and assume an ansi compiler.
o Improve all diagnostic output
o Don't trap SIGSEGV
o SIGHUP now terminates again (log files are controlled
by syslog)
o Call CloseModem() when changing devices
o Fix parsing of third arg of "delete"

I think this fixes the "magic is same" problems that some
people have been experiencing.
The man page is being rewritten. It'll follow soon.


# 1f3dee4c 31-May-1997 Brian Somers <brian@FreeBSD.org>

Remove initial startup printf's in -direct mode.
Make "same magic" error send a NAK (as per rfc).


# 6ed9fb2f 25-May-1997 Brian Somers <brian@FreeBSD.org>

De-couple ppp from libalias. If libalias isn't there, the
alias commands simply won't work. Only root may specify the
location of the alias lib (otherwise, it's hard-coded).

Make logprintf silently fail if LogOpen hasn't been called.

Suggested by: eivind


# 2f8fcf44 07-May-1997 Brian Somers <brian@FreeBSD.org>

Only compress tcp packets. Calculate size of
logbuff rather than guessing at 2000.

PR: 2046
Submitted by: torii@tcd.hitachi.co.jp


# 63202ff1 03-May-1997 Andrey A. Chernov <ache@FreeBSD.org>

Log each ppp line to separate /var/log/ppp.tunX.log instead mixing of
all lines into single /var/log/ppp.log


# c6c740be 13-Mar-1997 Brian Somers <brian@FreeBSD.org>

Requested by: Harlan Stenn <Harlan.Stenn@pfcs.com>

Accept SIGHUP as a "re-open logfile" signal. As ppp
doesn't set it's serial line to it's controlling terminal,
we can use HUP :)

This is a candidate for 2.2. The log.[ch] changes won't
conflict, but the main.c changes will. We just want to change the
kill(...,SIGHUP) to a SIGTERM and change the signal(SIGHUP,Hangup)
to a pending_signal(SIGHUP,LogReOpen).


# 476602a9 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 99c02d39 10-Jan-1997 Warner Losh <imp@FreeBSD.org>

Fix many buffer overruns in the code. Specifically, disallow ExpandString
to be used to expand things beyond the size of the buffer passed in. Also
do a general cleanup of sprintf -> snprintf as well as strcpy and strncat
safety. Also expand some buffers to allow for the largest possible data
that might be used.

This is a 2.2 candidate. However, it needs to be vetted on -current
since little testing has been done on this due to my lack of PPP on
this machine.

Reviewed by: Jordan Hubbard, Peter Wemm, Guido van Rooij


# 9c749ffb 11-May-1996 Poul-Henning Kamp <phk@FreeBSD.org>

Here is a diff of /usr/src/usr.sbin/ppp against current. The diffs
add some logging functionality which I find very useful.
'set debug link' will record just link up/down and address assignments.
'set debug connect' will record the entire chat dialog
'set debug carrier' will record just chat lines including 'CARRIER'
(so that I can be sure I'm getting a 28.8 line).

There was a global change required to permit LogPrintf to take a bit
mask instead of a bit position value (to permit logging some events
on either of two flags, so that no change in 'set debug lcp' would
result from the code supporting 'link'. Thus the diffs are rather
long for such a small change. The man page is also touched.

Oh, and there was a slight syntax problem in route.c

Reviewed by: phk
Submitted by: Tony Kimball <alk@Think.COM>


# 709e8f9a 29-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 53c9f6c0 25-Feb-1995 Atsushi Murai <amurai@FreeBSD.org>

New user Process PPP based on iij-ppp0.94beta2.

o Supporting SYNC SIO device (But need a device driver)
- add "set speed sync"
o Fixing bug for Predictor-1 function.
o Add new parameter that re-sent interval for set timeout commands.
o Improving RTT (Round Trip Time) and reducing processor time.
- Previous Timer service was using polling, and now using
SIGALRM ;-)
- A 0.94beta2 will not work correctly....

-- Follows are additinal feature not including 0.94beta2
o Support Proxy ARP
- add "enable/disable proxy" commands
o Marging common routine in CHAP/PAP.
o Enhancing LCP/IPCP log information.
o Support local Authfication connection on port 300x and tty.
- You can set up pair of your "hostname -s" and
password in ppp.secret. if either ppp.secret file nor
your hostname line don't exist, It will notify a message
and working as same as previous version.(Backword compatibility)
- If you did set up them, It's allow connection but nothing to do
except help and passwd command.
- add "passwd yourpasswd" commands
o Support afilter - keep Alive filter that a packet can send/receiving
according to ifilter/ofilter but doesn't count it as preventing idle
timer expires.
- Same syntax of other filters.
o Fixing bugs reported by current user for previous one. Thanks !!

Reviewed by: Atsushi Murai (amurai@spec.co.jp)


# af57ed9f 30-Jan-1995 Atsushi Murai <amurai@FreeBSD.org>