Commit Graph

92 Commits

Author SHA1 Message Date
bde
ce4119983d Updated DPADD to match LDADD. 1997-01-06 07:05:08 +00:00
wollman
5972643f58 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
jkh
52623b565c For /usr/sbin/ppp, you must choose between running ppp in the background or
connecting to a host immediately in the foreground.

I would like to be able to run ppp from a script so that my script can be
sure that it is connected to the 'net before it continues running:

  # Dial up the internet.
  ppp -background myprovider || exit 1

  do-some-net-command

  # Hang up the modem.
  kill -HUP `cat /var/run/ppp.tun0.pid`

Another problem is that the current ppp calls its process id file
`/var/run/PPP.server', which may conflict if you have more than one IP
tunnel interface available.

Closes PR#1469
Submitted by:	Gord Matzigkeit <gord@enci.ucalgary.ca>
1996-12-22 17:29:33 +00:00
jkh
6ca14a89c6 Make CRTSTS selection a runtime option. Closes PR#1392
Submitted by:	Mike McGaughey <mmcg@heraclitus.cs.monash.edu.au>
1996-12-22 17:09:17 +00:00
nate
1d0c7cf264 Compute IP checksums in addition to TCP checksums when necessary in the
new 'aliased' packets.  Note, if the original packet has a bogus cksum,
we will *NOT* re-compute the cksum, therefore the new packet will also
be wrong (but passed on).

Found by:	MartinRenters@awfulhak.demon.co.uk
Reviewed by:	Brian Somers <brian@awfulhak.demon.co.uk>
Submitted by:	Charles Mott <cmott@srv.net>
1996-12-21 18:34:52 +00:00
nate
8f656e55b3 Fixed prototypes of PacketAliasIn/Out. (cosmetic)
Submitted by:	Brian Somers <brian@awfulhak.demon.co.uk>
1996-12-19 00:41:42 +00:00
pst
7f6c218474 Avoid some buffer overrun problems. 1996-12-15 20:39:30 +00:00
jkh
e9d9f1a03f The infamous IP aliasing code for ppp, modified to work as a runtime option
(otherwise ppp's behavior remains unchanged) and documented by myself,
Steve Sims, Nate Williams, Martin Renters and god-only-knows who else. :-)
Submitted by:	nate
Obtained from:	Charles Mott <cmott@srv.net>
1996-12-12 14:39:47 +00:00
wollman
d3ecee07b3 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
nate
8620fc8544 Added my 'ddial' patches to user-PPP. The new mode tries it's darndest
to keep the link up, so it re-dials whenever it detects the link go
down.  This is useful for 'dedicated' links who use PPP.

It's been used for over a year w/out problems at different sites.
1996-12-03 21:38:52 +00:00
phk
444e962c43 typo 1996-11-19 11:08:27 +00:00
joerg
3029e93724 Improve the sample login script now that our sh(1) understands -p.
Closes PR # docs/1383: ppp(8) man page suggests using shell script...
1996-10-31 19:55:05 +00:00
jkh
a95b9bd326 Make changes suggested in PR#1825, closing it. Removes default local
hack behavior better than previous commit.
Submitted-By: Peter Childs <pjchilds@imforei.apana.org.au>
1996-10-18 03:47:53 +00:00
jkh
4822eb7860 Turn LOCALHACK off by default (whoops!)
Noticed-By: Atsushi Murai <amurai@spec.co.jp>
1996-10-18 01:44:45 +00:00
sos
75d85a7c3c Fixed the security leek I introduced the other day, now
shell command is only executabel from command files, not
from the commandline.
1996-10-13 15:05:14 +00:00
jkh
bba6a15120 1. Room to calculate MD5 for CHAP negotiation is shorter than
required. a core is not dumped at first connecting time and
   dumped at second or third time. (patch I)
2. A routine for "show route" refers out of allocated space.
   Values pointed by "lp" should be read as CHAR, I think.
   there is also no free() for disallocation. (patch II)

Here is also a patch for an improvement: In current imprementation,
even if PPP connection is disconnected by time out, prompt of
interactive mode does not change from "PPP>" to "ppp>" to
indicate the disconnection on a terminal.
So I modified the code to do that. (patch III)

Submitted-By: NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
1996-10-12 16:20:34 +00:00
sos
aedb306d8b Allow shell commands in all modes.
Old behavior can be had with define SHELL_ONLY_INTERACTIVELY
1996-10-10 11:27:35 +00:00
sos
7510af99b9 Add the feature to use MYADDR & HISADDR macroes as arguments to
a shell escape.
1996-10-07 10:01:17 +00:00
jkh
e80eb7c648 Properly include prototypes.
Submitted-by: "Daniel O'Callaghan" <danny@panda.hilink.com.au>
1996-10-07 04:21:09 +00:00
jkh
5a5660018d Add passwdauth to list of vars.
Submitted-by: Peter Childs <pjchilds@imforei.apana.org.au>
1996-10-06 19:39:08 +00:00
jkh
0126fef03c Add support for the Evil Microsoft ppp extentions. Yes, they did it
on their own without even attempting to get concensus in the IETF, but
there are also lots of Win95/NT boxes out there.

CLoses PR#1494
Submitted-By: Peter Childs <pjchilds@imforei.apana.org.au>
1996-10-06 13:32:37 +00:00
bde
8600cf9297 Moved getdtablesize() out of a loop. 1996-09-28 11:25:47 +00:00
peter
72e76de98b Add RTF_STATIC to default route's flags in the hope that routed will no
longer remove it while it is running.
1996-08-13 09:19:45 +00:00
phk
11aea80c52 Reset Pred1 protocol on FCS errors. 1996-07-21 13:01:27 +00:00
ache
a6d4555f2b Dump core on SIGSEGV instead of silent exiting. I saw SIGSEGV few times,
but they are VERY rare to tracking down this bug. I hope core
helps to track it down.
1996-07-09 17:40:36 +00:00
ache
24909cdf1b Prepare for exec properly and check return values
Submitted by: Arjan de Vet <devet@IAEhv.nl>
1996-06-09 20:40:58 +00:00
gpalmer
f41bdecc32 Close a file descriptor leak. Possibly closes PR #1212 1996-06-03 21:35:21 +00:00
phk
dc61083d98 PR: bin/1194: PPP server port not initialized
Latest round of changes omitted initialization of tunnel device
unit variable.

Submitted by:	John Capo <jc@irbs.com>
1996-05-13 07:20:11 +00:00
phk
324cb686d3 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>
1996-05-11 20:48:42 +00:00
mpp
f0128769a1 Xref chat(8) and pppd(8). Also change .It references to .Pa for file
name references in the file section.
1996-05-02 19:18:47 +00:00
bde
13e9cefca0 Fixed a couple of format strings to match the change of pid_t from long
to int32_t.  I only fixed the ones that I noticed the warnings for.
Perhaps most of the format strings are correct now because they were
wrong before.  Except of course if int32_t isn't compatible with `int'.
1996-04-13 15:47:43 +00:00
dg
c86a38ea15 Fix editing mistake in last commit...sorry. 1996-04-11 08:24:04 +00:00
dg
7b2dcb887c Bugfix based on a kernel fix:
When PPP gets an uncompressed packet, it attempts to save off the TCP/IP
header for use in decompressing subsequant packets. If PPP gets garbage
(such as what happens when there is a port speed mismatch or modem line
noise), it will occasionally mistake the packet as a valid uncompressed
packet. When it tries to save off the header, it doesn't bother to check
for the validity of the header length and will happily clobber not only
the PPP VJC data structure, but parts of other process memory that happens
to follow it...causing, ahem, undesired behavior.
1996-04-11 08:14:44 +00:00
ache
6950a2d26e Here is a patch for a little bug in the WaitForString routine. The problem
is when the matched string spans the end of the inbuff.  This fix allocates
twice the IBSIZE so that it can keep the last and the current text to search
in the inbuff so that the match won't fail if it gets truncated by the read.

It also warns if the search string is to long and truncates it.

Submitted by: Dough Ambrisco <ambrisco@ambrisco.roble.com>
1996-04-06 02:00:17 +00:00
ache
42d182a2a9 Put signal number into logfile 1996-03-30 18:27:45 +00:00
ache
92cff4dcbb Fix UnrawModem:
restore initial (not second level) state
not call it for DEV_SYNC
issue input flush after restoring
1996-03-29 15:24:04 +00:00
ache
cbcda5a3cf Directly clear parity area because cfmakeraw not do it 1996-03-28 13:38:59 +00:00
ache
a835b01176 After real problem is found (flush never occurse), re-enable
software flow control, but re-enable it properly,
idea taken from taylor 'cu'
1996-03-27 22:58:21 +00:00
ache
8e37357d03 Fix typing bug cause flushing never occurse:
TIOCFLUSH -> TCIOFLUSH
1996-03-27 22:28:19 +00:00
ache
bb04bf04b1 Use cfmakeraw() instead of all those termios settings 1996-03-27 21:40:55 +00:00
ache
53f9b4a901 Cleanup both raw & termianl modes termios flags settings 1996-03-27 21:16:32 +00:00
ache
b33cfa3fa2 Disable ^S/^Q flow control!!! 1996-03-27 20:53:03 +00:00
ache
f5a60d6db1 Better fix for terminal mode 1996-03-13 12:02:16 +00:00
ache
f785271dda 1) Open /dev/null for std* after setsid() to be shure that modem is
*not* our controlling terminal (SIGHUP can coming in other case)

2) Add HUPCL for non-dedicated lines to be shure that modem
properly resetted.

3) Correct usage string.
1996-03-09 08:18:41 +00:00
ache
53c7b9f853 Prevent dial cycling on the last phone from the list, make phone list copy 1996-03-08 13:22:23 +00:00
ache
8d299fcc23 Log phone as LOG_PHASE, it is valuable enough for multi-phone environment.
Add missing return when terminal mode can't be re-established due
to modem not opened.
1996-03-08 12:34:40 +00:00
ache
60108c50ed 1) Add multi-phone dialing/redialing, several phones separated by ':'
2) Improve on-line help subsystem
3) Make 'term' mode works even carrier dropped (old code
close line forever here)
4) Make 'term' mode 8bit clean.
5) Improve manual page
6) #ifdef DEBUG diagnostic about missing optional files.
7) Don't put interactive dialing info to logfile
1996-03-08 09:03:09 +00:00
ache
db042deee5 Eliminate multiply uucplock.c 1996-03-04 10:38:42 +00:00
phk
62d807ed9d Use libmd's MD5.
inline hdlc checksum calculation.
make big tables const.
1996-01-30 20:04:34 +00:00
mpp
511d4f82b2 Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00