Commit Graph

201 Commits

Author SHA1 Message Date
brian
60c55d628f Use libalias.so.2.2 1997-08-03 20:21:22 +00:00
brian
e54335d741 Remove extraneous prototypes. 1997-08-01 02:02:28 +00:00
brian
f15b8d152a Set up the alias address before executing
the contents of ppp.linkup.
1997-07-29 22:37:04 +00:00
brian
4af16ddc99 Fix file descriptor leaks. 1997-07-28 01:02:27 +00:00
brian
789c3c7d29 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
55aac7e4ff 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
e3faa34d53 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
aa8643ed6c Allow service names in "set server" 1997-07-12 19:22:34 +00:00
phk
1cca29c8ab Reset all LQR variables when we start over. 1997-07-02 19:18:42 +00:00
brian
067015aaae 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
ef60b19dca Allow specification of a umask for local socket
creation in "set server" command.
1997-06-30 03:03:38 +00:00
brian
ac73344ac9 Fix HUP handling while dialing.
Pointed out by:	ache
1997-06-29 13:54:31 +00:00
brian
512e26e794 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
fef65421d3 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
082cf8524f 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
3f5321d2b9 Fix ~? output in "term" mode.
Spotted by: Harry Starr <starr@gccs.com.au>
1997-06-24 21:25:06 +00:00
brian
a3c9607200 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
d1c718d9c3 Typo police.
Submitted by: Chuck Robey <chuckr@glue.umd.edu>
1997-06-23 23:08:23 +00:00
brian
78d67a98b9 Fix "set parity"
PR:		3881
Actual problem found by:	shocking@mailbox.uq.edu.au
1997-06-23 19:18:13 +00:00
brian
c74ce8e38c Fix "delete all".
PR:		3913
1997-06-20 23:43:35 +00:00
brian
374f602b4e Cosmetic: Fix help syntax. 1997-06-17 02:04:51 +00:00
brian
75122c3d71 Handle redial tries correctly under -ddial 1997-06-17 01:46:05 +00:00
brian
121bd4b70f Put TCP/IP logs back on one line. 1997-06-16 21:20:00 +00:00
brian
73d09cd540 Set netfd to STDOUT_FILENO rather than STDIN_FILENO. 1997-06-16 19:59:41 +00:00
brian
5d122ca2ef Correct filter docs.
PR:		3464
Submitted by:	Stephen J. Roznowski <sjr1@flash.net>
1997-06-16 13:52:10 +00:00
brian
95a0b5dc63 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
ache
66946f9305 Remove srandomdev fallback code 1997-06-14 00:27:03 +00:00
brian
328f056077 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
1fd5f260cd 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
e6dedeb7e4 Fix "show ?" alignment.
PR:		3830
Submitted by:	Josh Gilliam <josh@quick.net>
1997-06-13 00:09:54 +00:00
brian
747720e64d Document ppp over tcp (how to tunnel) 1997-06-13 00:04:58 +00:00
brian
5d18065463 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
84d5b39da1 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
94d661ac8c 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
9256ed6239 Remove mis-leading version info. 1997-06-03 00:35:03 +00:00
brian
e28b617f4a 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
5992baf27d 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
a58162b8e7 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
e39002afc2 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
brian
0e77953308 Implement "set mtu" command to allow the client to
reduce the interface mtu.
Allow max mru spec of 16k.
Add "show m[rt]u" ability.
1997-06-01 01:13:04 +00:00
brian
ea3d6b0743 Remove "set mtu ..." ability. Currently, this is an
"alias" for "set mru ...", but there's no such thing
as setting your mtu in the ppp protocol (rfc1661).
1997-05-31 16:37:19 +00:00
brian
ba44f8b683 Correct the return of DialModem()
Suggested by:	kfurge <kfurge@worldnet.att.net>
1997-05-29 02:29:13 +00:00
brian
12b254e316 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
1997-05-26 00:44:10 +00:00
brian
8089164d6f Include <alias.h>, not "alias.h" 1997-05-25 19:49:44 +00:00
brian
81067cb46e Fix the reconnect option, and add an explanation to vars.h 1997-05-24 17:32:42 +00:00
brian
a62138d5f0 Finish updating for the latest alias code.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 05:34:15 +00:00
brian
33deb302fe Add SO_REUSEADDR socket opt in case the last telnet
connection is in a time_wait.

Submitted by:	Brian Campbell <brianc@pobox.com>
1997-05-23 05:22:48 +00:00
brian
6d0cdc4cfb Use the latest alias engine - now in libalias.
Submitted by:	Charles Mott <cmott@srv.net>
1997-05-23 04:54:03 +00:00
brian
d13ad90ef4 Output exit status description of child in background mode. 1997-05-19 03:02:36 +00:00
brian
ee01b28050 Mega update to sort out bad implementations
of reconnect & -background.

o   Fix reconnect anomolies.
o   Make reconnect apply to failed LQR hangups (& mention in man page).
o   Make reconnect effective in -background mode.
o   Listen on socket in -background mode.
o   Try all phone numbers in -background mode.
o   Insist on system arg in -background mode.
o   Make a control-connection close command exit in -background mode.
o   Output status message to stdout on exit of parent in -background mode.
o   Don't notify parent of success too soon.
o   Describe termination EX_* code.
o   Miscelaneous diagnostic corrections.
o   Remove redundant connect_time from modem.c.
o   Don't repeatedly DownConnection().
1997-05-19 02:00:16 +00:00