Commit Graph

410 Commits

Author SHA1 Message Date
Brian Somers
5d5e507005 Interpret AF_LINK sockaddrs correctly in show/delete route.
Print out inteface names rather than numbers, and use the
same "find out the names" code in SetIfAddr().  This means
that the nasty ioctl(,SIOCGIFCONF,)/realloc loop is now
buried :-)
1997-11-15 02:15:56 +00:00
Brian Somers
b351d6b7c3 uucplock is in section 3 not section 8 ! 1997-11-14 20:07:39 +00:00
Brian Somers
9e836af5d9 Update the cftypes arrays according to rfc1700.
Log IPCP reqests as IPCP.
1997-11-14 15:39:15 +00:00
Brian Somers
a23e75e150 Allow blank lines in config entries (they aren't terminators). 1997-11-14 15:38:07 +00:00
Brian Somers
9fecb4e63f Use seteuid() instead of setreuid().
The setreuid() page says seteuid is better !
1997-11-13 17:31:52 +00:00
Brian Somers
4562be7470 Don't run if ppp.conf is writable. 1997-11-13 15:35:06 +00:00
Brian Somers
815624cfab Log a warning when a -direct invocation is denied. 1997-11-13 14:44:06 +00:00
Brian Somers
d9181b0512 Fix command logging (broken with the "allow" command). 1997-11-13 14:43:20 +00:00
Brian Somers
04da22ce2d Null commit: The last commit made some warning messages clearer. 1997-11-13 12:10:50 +00:00
Brian Somers
e445012341 Don't delete interface routes when we do an LcpDown.
They'll get deleted in Cleanup().
1997-11-13 12:09:57 +00:00
Brian Somers
a272e47d50 Understand networks in the filter rules. We don't
insist on x.x.x.0/24 - x.x.x.x/24 is ok too.
1997-11-12 21:04:21 +00:00
Brian Somers
710e9c2970 Log whether or not IP packets are bloked due to
a filter.
1997-11-12 19:48:45 +00:00
Brian Somers
c40e02e7f3 Return correct value from "set loopback".
Output "set ?filter deny host|port" rules correctly
with show ?filter.
Submitted by:	Dave Bodenstab <imdave@mcs.net>
1997-11-12 18:47:30 +00:00
Brian Somers
6143f398f8 Don't attempt to dial if "dial label" has specified
a restricted label.
1997-11-12 16:34:51 +00:00
Brian Somers
6c5a1dc652 Pass a missing arg to LogPrintf(). 1997-11-12 15:50:38 +00:00
Brian Somers
adbec73e00 Don't warn that we're waiting for the command to complete if
we've put it in the background (!bg).
1997-11-12 02:10:05 +00:00
Brian Somers
a9c503af9d Don't moan about unexpected config req's when in ST_STOPPING. 1997-11-11 23:23:11 +00:00
Brian Somers
12ef29a81a Finish the security improvements:
o Add "allow" command:
      "allow users a b c" gives access to users a, b and c.
      "allow modes auto"  gives those users access to auto mode only.
      "allow users *" and  "allow modes *" are accepted.
      No users and all modes are allowed by default.
    UID 0 can do anything.
  o Set the current label with the "load" and "dial" commands
    so that the call to ppp.linkdown makes sense.
  o Up the verison number.
  o Don't OR MODE_AUTO for -background and -ddial.
  o Don't OR MODE_INTER when we get a diagnostic connection.
  o Allow up to 40 args per line (was 20).
  o "set ifaddr" only changes the interface in AUTO mode (with other
    modes, it happens after IPCP negotiation).
  o Sort command descriptions in the man page.
  o Support -dedicated mode where we just talk ppp forever (no login etc).
1997-11-11 22:58:14 +00:00
Brian Somers
3d8ad715f4 Fix typo that causes CHAP RESPONSEs to *always*
be damned M$ responses if you've got DES.
1997-11-11 13:08:12 +00:00
Brian Somers
3aa7aa46a3 Flush the output stream when doing local logging. 1997-11-11 12:26:34 +00:00
Brian Somers
bdbc7471d7 Don't Cleanup() in background mode when
we get a "close", the LcpClose() will
eventually do it when we get to PHASE_DEAD.
1997-11-09 23:40:21 +00:00
Brian Somers
116e558a8f Initialize VarAltPhone.
PR:		4993
1997-11-09 22:56:15 +00:00
Brian Somers
8ea8442c9a Don't create a diagnostic socket by default.
Allow a password spec on the "set server" command line.
Use SIGUSR2 to close the diagnostic socket.
Some man page corrections.
1997-11-09 22:07:29 +00:00
Brian Somers
d025849c64 Don't ask for a password if it's specified as empty. 1997-11-09 18:51:23 +00:00
Brian Somers
da2a8b4d42 Add the "!include" syntax.
Return 0 from "show" commands.
1997-11-09 17:51:27 +00:00
Brian Somers
86e0293468 Increase chat script sizes to 512
Requested by: Michael Reifenberger <root@totum.plaut.de>
1997-11-09 14:18:55 +00:00
Brian Somers
50454ee744 Remove the use of $HOME/.ppp.* 1997-11-09 13:18:51 +00:00
Brian Somers
6e96766a46 Null commit:
The last modification removed the use of $HOME/.ppp.*
1997-11-09 13:18:18 +00:00
Brian Somers
5106c67149 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.
1997-11-09 06:22:49 +00:00
Brian Somers
592fb86275 When responding to a CHAP challenge, don't try to use
ppp.secret to get a key value based on the peers name,
then send the value of AuthName with the encrypted result.
This is *way* too confusing.
Instead, always use AuthName and AuthKey as the documentation
says.
1997-11-09 03:55:27 +00:00
Brian Somers
d3a3ec3bb5 Don't include RTA_GATEWAY in rtm_addrs unless it's specified. 1997-11-09 03:22:49 +00:00
Brian Somers
87786af251 Typo police. 1997-11-08 12:37:33 +00:00
Brian Somers
9780ef311d Don't pass global vars as args.
Remove local/global conflicts.
1997-11-08 00:28:11 +00:00
Brian Somers
9633be85d7 o Spelling police.
o  Emphasize ``PPP''
o  x-ref other programs
o  Some minor clarifications
1997-11-06 00:25:33 +00:00
Brian Somers
a1e8f9372a Introduce [local] to "set log [local] ...". This spits
logging out to the screen in terminal mode - should be
good for installation problem diagnosis.
1997-11-04 01:17:05 +00:00
Brian Somers
0fe7ca3165 o Bump version to 1.3 to reflect major changes
o  Report modem connect time properly
o  Report bytes in/out over physical media
o  Fix phases (TERMINATE is *higher than* DEAD)
o  Do a LayerFinish from LcpDown
o  Bring down IPCP & CCP when we enter PHASE_TERMINATE
o  Give a new prompt when we go to PHASE_DEAD
o  Stop the modem timer properly when idle
o  Treat sig 15 like an exiting carrier loss
o  Log (DEBUG) offline & online transitions
1997-10-29 01:19:51 +00:00
Brian Somers
6eaa6ac5d5 Cosmetic:
Move prototypes into the correct headers.
1997-10-26 12:42:13 +00:00
Brian Somers
75240ed178 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
1997-10-26 01:04:02 +00:00
Brian Somers
9a571ec74e sleep => nointr_sleep
usleep => nointr_usleep
(not just a #define)
Already done by: ache
1997-10-24 22:36:31 +00:00
Andrey A. Chernov
1f1d79b8fe Restore back non-interruptable sleep/usleep just redefine them to not
mix with standard library functions
1997-10-23 21:32:48 +00:00
Andrey A. Chernov
cc2847b862 Remove private sleep/usleep hacks 1997-10-23 20:11:01 +00:00
Brian Somers
01db51af7a Fix various filter problems
PR:		4727
Submitted by:	Chiharu Shibata <chi@bd.mbn.or.jp>
1997-10-23 10:09:35 +00:00
Brian Somers
a9e8f80739 Fix HDLC logging (actually LogDumpBp()). It was only
outputting the first mbuf in the chain.
1997-10-22 01:22:51 +00:00
Brian Somers
ee5c6273d7 Ask for VJ slot id compression by default. 1997-10-17 00:20:30 +00:00
Brian Somers
331953abc2 cosmetic:
o  Log client connection commands when "set log +command"
o  Don't display PAP password in the log unless we're
   "set log +debug".
1997-10-16 23:55:19 +00:00
Brian Somers
30bbbd3edd Initialise LCP, IPCP and CCP as soon as LCP is down.
Without this, in -auto mode, we stay in ST_STOPPING
and never check our dial filters to see if it's time
to bring the line up again.

This may make "set stopped" redundant.
1997-10-15 01:01:17 +00:00
Brian Somers
6f59cd11ea Un-spam ip_sum (arrgh - I don't know how this made
it into my patches :()
1997-10-12 21:43:55 +00:00
Brian Somers
0ebb52de1d Cosmetic: Mention that ppp is suspending before
executing a "shell" command.
1997-10-12 01:49:37 +00:00
Brian Somers
03604f3574 Support VJ maximum slot identifiers != 15.
Support VJ slot id compression.

Previously, ppp would negotiate a max slot between 2 & 15
(if asked), and would agree to slot id compression (if asked).
It would then proceed to use 16 slots and no compression
anyway.  The result was a rather unusable connection.
1997-10-07 00:56:58 +00:00
Brian Somers
e70c96ab58 Change things around a bit when bringing down the layers.
o LcpLayerDown() no longer does a NewPhase(PHASE_TERMINATE).
  Instead, it's done in LcpLayerFinish().  LayerFinish() gets
  called by the FSM after the LCP FSM goes through the Stopping
  and Stopped states.

o -direct and -background mode exit at PHASE_TERMINATE, not
  PHASE_DEAD.

The result is that LCP, CCP & IPCP are brought down cleanly on both
sides of the link (not just our side).  Killing ppp rather than just
closing it still makes it get out after the LCP SendTerminateReq().
I'll have a look at that soon.  We're probably not actually sending
the REQ :-(
1997-10-05 15:00:10 +00:00
Brian Somers
d37641d82c Refer a bit to pppctl.
Suggested (far to subtly for his own good) by:	joerg
1997-10-05 14:27:08 +00:00
Brian Somers
6c9e376dfe Cosmetic: Be specific about using TABs in syslog.conf. 1997-10-05 10:29:32 +00:00
Brian Somers
57fd05c48b Cosmetic: Log a strerror(errno) when failing to write to
the tun device.
1997-10-04 00:14:39 +00:00
Brian Somers
8bfa2d0ed9 If "set mtu" is used, *and* the mtu is less than the
value requested by the peer, NAK using this value
rather than silently just changing the interface
mtu.
1997-09-29 19:40:16 +00:00
Brian Somers
4e556546a8 Test for the existence of ../../secure rather
than /usr/include/des.h before building with MSChap.
support.  Also allow -DNOCRYPT (as well as -DNOSECURE)
as an override
sbin/init example pointed out by: bde
1997-09-28 20:17:59 +00:00
Brian Somers
fde958c3d3 Don't depend on time.h including sys/types.h 1997-09-27 19:41:40 +00:00
Brian Somers
f0d4fed251 Don't login twice when using passwdauth
Suggested by:	Peter Childs <pjchilds@imforei.apana.org.au>
Merge the whole module into a few lines in pap.c
1997-09-27 19:11:43 +00:00
Brian Somers
252715a39c #define RECON_ENVOKED as 4 (not 3, like RECON_UNKNOWN)
Pointed out by:	tom@tomqnx.com (Tom Torrance at home)
1997-09-26 00:23:36 +00:00
Brian Somers
0f8e0938a0 Do the MSChap encryption.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:58:20 +00:00
Brian Somers
7351f9d8e8 Allow Microsoft CHAP authentication.
This is a combination of MD4 & DES.
Submitted by:	Gabor Kincses <gabor@acm.org>
1997-09-25 00:52:37 +00:00
Brian Somers
c06022153e Don't luse uu_lock in -direct mode. It conflicts w/
hylafax & the like.
Get the CD bit right at last - now that I've got
my second modem back - loss of carrier makes ppp exit.
1997-09-23 22:07:51 +00:00
Brian Somers
3f1125194b Undo botched commit (local changes got in) 1997-09-23 19:52:14 +00:00
Brian Somers
301127fb0a Don't allow accept/deny when it's not appropriate.
Log PAP/CHAP users in utmp & wtmp, allowing it to
be avoided with "disable utmp"
1997-09-22 23:59:16 +00:00
Brian Somers
586526be29 Don't pause for one second before starting LCP
negotiation.  Instead, incrementally pause after
receiving LCPs with the same magic.  We can now
suffer a server that waits more than 1 second before
responding.  Pauses greater than a second get
hopelessly confusing as when the server eventually
starts, it sees a flood of Config Requests followed
by config NAKs and changes of magic.  This causes the
server to change its magic over and over.....
1997-09-22 02:51:24 +00:00
Brian Somers
3defb7fc30 Use the correct device name in "show modem" 1997-09-22 00:55:46 +00:00
Brian Somers
35495bec8d Correct the way the uucp lock file and the ttyXX.if lock
file get created.  We don't create lock files over non-tty
connections, but we *do* create lock files in -direct mode.
This leaves us capable of adding utmp/wtmp support for
successful pap & chap logins (coming soon).
1997-09-22 00:46:56 +00:00
Brian Somers
94cad8bcb1 Sleep for a second before sending the first LCP
config request.  This stops us from squirting stuff
down a line that still has ECHO turned on because the
peer hasn't had a chance to start yet.
Lead to the cause by:	Greg Lehey <grog@lemis.com>
1997-09-21 23:01:34 +00:00
Brian Somers
c47cab6191 It turns out that the following:
close(1);
  close(2);
  x = open(ctermid(NULL), O_RDWR|O_NONBLOCK);
  close(0)
on a tty causes select() to return an exception for descriptor x !
This is the case in RELENG_2_2, but not in 2.2.2.  I'm not sure why.
Instead of doing the x=open() and close(0), we just do x=0 now.
Problem pointed out by: Greg Lehey <grog@lemis.com>
                        Tomi Vainio <tomppa@fidata.fi>
1997-09-21 20:26:47 +00:00
Brian Somers
705c7a18f9 Typo police
Submitted by:	Mark Cammidge <mark@gmtunx.ee.uct.ac.za>
1997-09-21 13:08:00 +00:00
Brian Somers
599864f851 Add a pppctl(8) xref.
Suggested by:	joerg
1997-09-21 13:06:43 +00:00
Brian Somers
fd2bc5eb1d Don't close(1) in direct mode and then proceed to
isatty(1) !  Keep 0 open for this till the modem's
been set up by either dup()ing 0 or by opening
ctermid(NULL) (if isatty(0)).

Discussed problem with: Tomi Vainio <tomppa@fidata.fi>
Made it finally dawn on me: Angelo Turetta <ATuretta@stylo.it>
1997-09-18 00:15:25 +00:00
Brian Somers
f919b46768 Support CHAP using MD4
Suggested by: jordan
1997-09-17 23:17:57 +00:00
Brian Somers
bc24029963 o Fix two unlikely descriptor leaks.
o Output the correct device for "show modem"
  while in -direct mode.
o Cosmetic:  Moan a bit more when we can't open
  the [modem] device.
o Call OpenModem() in a more "natural" way.
o Add some LogDEBUG in OpenModem().
1997-09-16 23:15:16 +00:00
Brian Somers
b0f5f9ed37 Get rid of missing-prototype-warning 1997-09-10 23:55:35 +00:00
Brian Somers
f7fdd41d4a PRED1 => TY_PRED1 (oops) 1997-09-10 21:36:54 +00:00
Brian Somers
29a6597c6b o Initialize the PRED1 input queue when we
receive the ResetAck, NOT when we send the
   ResetReq (as per the rfc).
o  SILENTLY ignore CCPs that arrive *before*
   the network phase (as per the rfc).
o  Check that we've actually negotiated PRED1
   before sending PRED1 output.
   This bug has been around for a *VERY* long
   time !  We shouldn't need to explicitly disable
   PRED1 now :-)
1997-09-10 21:33:32 +00:00
Brian Somers
10a91a42fc Cosmetic: Remove unused variables and build on OpenBSD. 1997-09-10 02:20:35 +00:00
Brian Somers
23a1cfaa6a Allow dial to work in non-interactive mode. 1997-09-09 23:56:29 +00:00
Brian Somers
3732c71b01 Print errors correctly (don't adjust
argc/argv for commands).
1997-09-09 23:23:24 +00:00
Brian Somers
ff9d952578 Don't start an interactive shell from a
telnet prompt.
1997-09-09 23:13:31 +00:00
Brian Somers
d40f8a5a61 Correct ppp authentication defaults in interactive
mode.  We don't want to be forced to type a password
here :-(
Pointed out by: mouth@ibm.net (John Kelly)

While I'm there, don't allow a "set server" in
interactive mode.
1997-09-09 21:51:39 +00:00
Brian Somers
506474c87a Document the use of PAP/CHAP properly. 1997-09-09 21:01:53 +00:00
Brian Somers
881a8bbf54 Disable LQR by default. It causes too many problems
with too many ISPs to be a good default.  LQR is still
accepted by default.
1997-09-07 01:00:06 +00:00
Brian Somers
8742662039 Use __libalias_version to derive the name to
pass to dlopen().
1997-09-06 11:16:02 +00:00
Brian Somers
683cef3c33 Install as group ``network''
Insist that uid == 0 for client ppp
Disallow client sockets if no password is specified
Don't exit on failure to open client socket for listening
Allow specification of null local password
Use reasonable size (smaller) ``vector''s in auth.c
Fix "passwd ..." usage message
Insist on "all" as arg to "quit" (if any)
Drop client socket connection before Cleanup() when "quit all"
1997-09-04 00:38:22 +00:00
Brian Somers
5b4c5b0055 Bring CCP and IPCP layers down properly when LCP
comes down.  Give a count of bytes sent/received
in IPCP log.
1997-09-03 02:08:20 +00:00
Brian Somers
b6d7b1e061 Allow the transition from an idle timeout value
of zero (no timeout) while IPCP is up.
Move some prototypes into .h files and re-order
some includes.
1997-09-03 00:40:51 +00:00
Brian Somers
afc7fa2c18 Cosmetic: Make LogPrintf() calls consistent. 1997-08-31 22:59:49 +00:00
Brian Somers
021352282c Make ppp owner root.ppp, mode 4550
Suggested by: guido
Condoned by: eivind
1997-08-31 20:18:03 +00:00
Brian Somers
709db7fbee Remove use of login_progok()
Suggested by: guido
1997-08-31 20:07:03 +00:00
Brian Somers
ce28475da5 Use login_progok(). 1997-08-27 20:11:16 +00:00
Brian Somers
4e752f44f0 Check the "prog.deny" login.conf capability and
refuse to run if "ppp" is in the list.
Suggested by:	"Daniel O'Callaghan" <danny@panda.hilink.com.au>
1997-08-26 23:20:16 +00:00
Brian Somers
f525ead3dd Lose a couple of extraneous backslashes. 1997-08-25 01:52:11 +00:00
Brian Somers
944f709824 Make the code format more in line with style(9).
Update loadalias to use the new libalias api.
Update to version 1.1.
1997-08-25 00:29:32 +00:00
Brian Somers
81816fc583 Phone the number after the ``|'' whether the dial
OR login script fails.

Catch a small typo in the man page.
1997-08-23 23:14:24 +00:00
Brian Somers
e47c8739d5 Update version number to 1.02 so that I can tell what
people are running
1997-08-21 17:20:00 +00:00
Brian Somers
c16615aa8b Update doc to use MYADDR in ppp.conf. 1997-08-21 17:16:21 +00:00
Brian Somers
1d205e1313 Allow the use of HISADDR & MYADDR in ppp.conf. 1997-08-21 17:07:30 +00:00
Brian Somers
de451c685c Add "set loopback on|off", defaulting to "on".
This tells ppp to loopback packets addressed to
the ppp interface IP coming *from* the tun
device.

This means that you can ping the tun interface IP
from inside :-)
1997-08-21 16:21:39 +00:00
Brian Somers
91fc7145dc Correct online usage message for "set ? stopped" 1997-08-21 16:18:07 +00:00
Brian Somers
cb611434af 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.
1997-08-20 23:47:53 +00:00
Daniel O'Callaghan
d053d1b926 Spelling police. 1997-08-19 11:27:00 +00:00
Daniel O'Callaghan
441de788b1 Typo fixes. 1997-08-19 11:18:34 +00:00
Brian Somers
3f6fd9230e Correct the forth arg to "set ifaddr". If specified,
it gives the IP number that should be used for initial
IPCP config requests, irrespective of MYADDR.
1997-08-19 01:10:24 +00:00
Brian Somers
b48dfe09c7 Introduce the "bg" command. It's pretty
much the same as "shell", but it's in the
background.
1997-08-18 20:15:10 +00:00
Brian Somers
eb53eaa30b Fix possible buffer overrun while "expect"ing
something that's "nearly" what it wants.
1997-08-17 22:47:07 +00:00
Brian Somers
0444761561 Typo police 1997-08-17 22:45:25 +00:00
Brian Somers
71144dc552 Allow the use of a "stopped" timeout via the
"set stopped" directive.  If the timeout occurs
it will cause a "Down" event, hanging up the line
if it's still up.  This *isn't* part of the FSM
diagram, but I consider it ok as a "higher level
implementation specific timeout" as specified in
the rfc ;-}

Discussed briefly with:	joerg
1997-08-17 20:45:50 +00:00
Brian Somers
5b9b04192a Allow specification of fallback phone numbers to
be used only if the dial script fails.
PR:		4262
1997-08-17 20:38:45 +00:00
Brian Somers
868cddb5fa Use libalias.so.2.3. 1997-08-11 22:07:57 +00:00
Brian Somers
cad5afb077 Correct default log file name.
PR:		4065
Prompted by:	Steve Price <sprice@hiwaay.net>
Submitted by:	sjr1@flash.net
1997-08-10 22:03:20 +00:00
Brian Somers
05dce3eefc Use libalias.so.2.2 1997-08-03 20:21:22 +00:00
Brian Somers
bfbee26298 Remove extraneous prototypes. 1997-08-01 02:02:28 +00:00
Brian Somers
4eb8b1640d Set up the alias address before executing
the contents of ppp.linkup.
1997-07-29 22:37:04 +00:00
Brian Somers
6614d8c5f3 Fix file descriptor leaks. 1997-07-28 01:02:27 +00:00
Brian Somers
9ed2f0484a Count the "proto" arg after a single address,
Check correctly for "deny" packets.
Submitted by:	Dave Bodenstab <imdave@mcs.net>
1997-07-27 23:26:23 +00:00
Brian Somers
e9eb6d7aa4 Don't try to ioctl(,TIOCOUTQ,) on a closed
descriptor.
Reported by:	Stephane Raimbault <stephane@cybersurf.net>
1997-07-24 02:42:34 +00:00
Brian Somers
c09be724d6 Allow a "hangup" capability.
You can now "ATZ" your modem when it's closed.

Submitted by:	peter@citylink.dinoex.sub.org (Peter Much)
1997-07-14 01:41:35 +00:00
Brian Somers
7cc60a7478 Allow service names in "set server" 1997-07-12 19:22:34 +00:00
Poul-Henning Kamp
177c95e45a Reset all LQR variables when we start over. 1997-07-02 19:18:42 +00:00
Brian Somers
873725cc51 Make HUP cause an exit (as it used to), and make
INT cause a hangup - not exiting for -ddial & -auto.

HUP must exit because init sends this at system shutdown
time (why, I don't know), and we don't want to end up
redialing after the HUP (due to another dfilter packet).

Pointed out by and discussed with: ache
1997-07-01 21:31:28 +00:00
Brian Somers
01ec25112c Allow specification of a umask for local socket
creation in "set server" command.
1997-06-30 03:03:38 +00:00
Brian Somers
76c5241d63 Fix HUP handling while dialing.
Pointed out by:	ache
1997-06-29 13:54:31 +00:00
Brian Somers
186d0be47e Deal with HISADDR/MYADDR in filter rules.
Mostly submitted by: kfurge@worldnet.att.net

Allow MYADDR in add/delete commands to facilitate
dynamic additions of a loopback route to MYADDR.
1997-06-28 01:34:03 +00:00
Brian Somers
4ef16f24f2 Add "set server" to control the server socket.
Catch SIGUSR1 to re-init listening socket.
Document signal behaviour.

Add missing '\n's to LogPrintf(LogWARN,...)
Main() returns int not void.

AF_LOCAL ideal suggested a long time ago by: joerg
1997-06-25 19:30:05 +00:00
Brian Somers
2126fb65a3 Allow shell commands (still run as original user)
unless defined out - including while a telnet
session with a -auto ppp is in effect.  If you
don't create ppp.secrets, you deserve what you
get.

telnet connection capabilities will be configurable
per system soon.

Suggested by: Terry Dwyer <tdwyer@omen.net.au>
1997-06-25 02:04:35 +00:00
Brian Somers
030d3ce62a Fix ~? output in "term" mode.
Spotted by: Harry Starr <starr@gccs.com.au>
1997-06-24 21:25:06 +00:00
Brian Somers
368aee2ba3 o Fix uptime for direct connections.
o Style police
o Make hangup abort the current connection, not
  necessarily exiting (-auto/-ddial).
o Trap HUP and INT during DoChat and abort the
  connection attempt.  This means you can now
  type "dial" and change your mind with ^C, or
  HUP the process to stop it dialing.

Slapped into doing it by: Chuck Robey <chuckr@glue.umd.edu>
1997-06-23 23:10:13 +00:00
Brian Somers
c3a83f6777 Typo police.
Submitted by: Chuck Robey <chuckr@glue.umd.edu>
1997-06-23 23:08:23 +00:00
Brian Somers
a6ae823cc3 Fix "set parity"
PR:		3881
Actual problem found by:	shocking@mailbox.uq.edu.au
1997-06-23 19:18:13 +00:00
Brian Somers
9b5a20e10a Fix "delete all".
PR:		3913
1997-06-20 23:43:35 +00:00
Brian Somers
3b80c31921 Cosmetic: Fix help syntax. 1997-06-17 02:04:51 +00:00
Brian Somers
712ae38782 Handle redial tries correctly under -ddial 1997-06-17 01:46:05 +00:00
Brian Somers
55a8cdea92 Put TCP/IP logs back on one line. 1997-06-16 21:20:00 +00:00
Brian Somers
cc39a98fd5 Set netfd to STDOUT_FILENO rather than STDIN_FILENO. 1997-06-16 19:59:41 +00:00
Brian Somers
fd59deba96 Correct filter docs.
PR:		3464
Submitted by:	Stephen J. Roznowski <sjr1@flash.net>
1997-06-16 13:52:10 +00:00
Brian Somers
d656a4c582 Remove call to daemon(). Just call setsid() and close
any relevent descriptors (0,2,[1]).  We've already fork()d.
PR:		3874
1997-06-16 13:24:59 +00:00
Andrey A. Chernov
687ee69a2a Remove srandomdev fallback code 1997-06-14 00:27:03 +00:00
Brian Somers
e696ee3b80 Fix "delete ...", it now only insists on
one arg too.

Discovered by:	Rikk Salamat <rikks@web-impact.com>
1997-06-13 03:59:36 +00:00
Brian Somers
94b3022ec7 Add ppp.linkdown file to compliment ppp.linkup.
Submitted by:	Forgotten
Passed on by:	Terry Dwyer 61 8 9491 5161 <tdwyer@io.telstra.com.au>

Also remove extraneous setuid(0) - it's only undone by
the subsequent call to SelectSystem().
1997-06-13 02:07:32 +00:00
Brian Somers
582691713e Fix "show ?" alignment.
PR:		3830
Submitted by:	Josh Gilliam <josh@quick.net>
1997-06-13 00:09:54 +00:00
Brian Somers
6ea261e21d Document ppp over tcp (how to tunnel) 1997-06-13 00:04:58 +00:00
Brian Somers
0706ff3806 Sort out ppp over tcp:
o Allow "set var" with no args to blank var (don't req "").
  o Zero VarTerm ASAP if not in interactive mode.
  o Never print anything to stdout in -direct mode.
  o Count redial when failing to open modem.
  o Increase device size to 40 characters (for host:port).
  o Remove missed "if (fd == 0) fd = 1;".
  o Don't give up on incoming non-terminal connections.
1997-06-11 03:57:51 +00:00
Brian Somers
e979ce388b Make the man page a little more detailed.
Update the version number to 1.00.
Increase the predictor-1 buffer by 2 bytes.
1997-06-09 23:38:38 +00:00
Brian Somers
927145be97 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.
1997-06-09 03:27:43 +00:00
Brian Somers
0e6f6af18d Remove mis-leading version info. 1997-06-03 00:35:03 +00:00
Brian Somers
8f2fa0eeaf Back out last change (which in fact breaks rfc1661)
and modify the behaviour so that a timer is started
and the restart counter is zeroed (as per the State
Machine Diagram).

Pointed-out-by:	joerg
1997-06-02 00:04:40 +00:00
Brian Somers
ceb1cfa497 Go directly to ST_STOPPED when a TerminateReq is
received and after the TerminateAck is sent (as
per rfc1661) rather than to ST_STOPPING.  Going
to ST_STOPPING will leave us in a state where
we're waiting for the other side to do something -
not a good idea, especially as the client side sends
a TerminateReq then exits on idle timeout.
1997-06-01 14:37:19 +00:00
Brian Somers
0d8fb00071 Reduce MAX_M[RT]U back to 2048. Even on a null-modem
ppp link, we gain nothing with a larger mtu.

Suggested by:	joerg

Fix pred1 buffer size (must be == MAX_MTU)
1997-06-01 11:35:04 +00:00
Brian Somers
1f3dee4c22 Remove initial startup printf's in -direct mode.
Make "same magic" error send a NAK (as per rfc).
1997-06-01 03:43:26 +00:00