OpenBSD CVS

CVS log for src/usr.sbin/ppp/Attic/command.c


[BACK] Up to [local] / src / usr.sbin / ppp

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.32, Mon Aug 31 00:20:32 1998 UTC (25 years, 9 months ago) by brian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.31: +1 -1 lines
FILE REMOVED

Upgrade ppp to version 2.0

This adds a number of features including:
o Multilink
o Callback (including CBCP)
o DNS negotiation (client & server)
o Easy to configure masquerading/packet aliasing
o Any number of diagnostic socket connections (limits DOS attacks)
o Sticky routes (ppp updates the routing table when the IP number is changed)

See the file README.changes for things that effect current
configurations.

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jun 28 09:41:37 1998 UTC (25 years, 11 months ago) by brian
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Don't assume sizeof(long) == 4

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jun 7 17:10:33 1998 UTC (26 years ago) by brian
Branch: MAIN
Changes since 1.29: +5 -4 lines
Diff to previous 1.29 (colored)

Use a width of 0 rather than 32 when HISADDR is 0.0.0.0.
Reported by:      many
Narrowed down by: Lutz Albers <lutz@muc.de>

Revision 1.29 / (download) - annotate - [select for diffs], Sat Apr 25 09:23:13 1998 UTC (26 years, 1 month ago) by brian
Branch: MAIN
Changes since 1.28: +5 -3 lines
Diff to previous 1.28 (colored)

Add libalias and tidy up a few warnings.
libalias does not build by default, you must build and
install it manually (cd ppp/libalias && make && make install).

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 13 01:25:54 1998 UTC (26 years, 3 months ago) by brian
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.27: +15 -12 lines
Diff to previous 1.27 (colored)

Add extraneous braces to stiffle warnings from gcc-2.8

Revision 1.27 / (download) - annotate - [select for diffs], Thu Mar 12 02:40:40 1998 UTC (26 years, 3 months ago) by brian
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

o Fix a few comment typos.
o Fix ``set timeout'' usage message and documentation.
o Change ifOutPackets, ifOutOctets and ifOutLQRs to `u_int32_t's
  so that they wrap correctly.
o Put the LQR in network byte order using the correct struct size
  (sizeof u_int32_t, not sizeof u_long).
o Wrap LQR ECHO counters correctly.
o Don't increment OutLQR count if the last LQR hasn't been replied
  to.
o Initialise HisLqrData (last received LQR) in StartLqm.
o Don't start the LQR timer if we're `disabled' and `accepted'.
o Generate LQR responses when both sides are using a timer and
  we're not going to send our next LQR before the peers max timeout.

LQR should now be fully functional.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jan 29 00:34:31 1998 UTC (26 years, 4 months ago) by brian
Branch: MAIN
Changes since 1.25: +13 -12 lines
Diff to previous 1.25 (colored)

Cosmetic:
  Don't mention the authors name at startup.  He's already credited
  in the man page.  Instead, make the message consistent with the
  one given to the diagnostic port (and fix the grammar when entering
  `term' mode).
  Don't credit the zlib author in the man page as ppp isn't linked
  directly with zlib (it's shared).
  Mention when the OpenBSD port was first made available.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 23 04:34:26 1998 UTC (26 years, 4 months ago) by brian
Branch: MAIN
Changes since 1.24: +7 -1 lines
Diff to previous 1.24 (colored)

Don't allow manual dialing unless in auto or interactive mode.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jan 20 22:46:23 1998 UTC (26 years, 4 months ago) by brian
Branch: MAIN
Changes since 1.23: +5 -6 lines
Diff to previous 1.23 (colored)

Allow an optional delay when specifying "set openmode active".
The delay defaults to 1 sec (as it always has) unless we've done
a ~p in interactive mode or we've actually detected a HDLC frame.
This is now cleanly implemented (via async timers) so that it is
possible for LCP to come up despite the delay if an LCP REQ is
received.

This will hopefully solve situations with slow servers or slirp
scenarios (where ECHO is left on the port for a second or so before
the peer enters packet mode).

Also, ~p in interactive mode no longer changes the value of the default
openmode delay and -dedicated mode enters packet mode in the right state
according to the value of openmode.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jan 18 20:47:19 1998 UTC (26 years, 4 months ago) by brian
Branch: MAIN
Changes since 1.22: +15 -11 lines
Diff to previous 1.22 (colored)

Allow "set vj" for changing the default number of slots
and whether slot compression is requested.
Don't show current values with "show ipcp" if IPCP isn't
"opened".

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jan 11 17:54:46 1998 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Make things work when sizeof(long) != 32 (hopefully)

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jan 10 21:50:56 1998 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.20: +6 -1 lines
Diff to previous 1.20 (colored)

Pause according to the redial setting when dialing manually.
Pointed out by: Berend de Boer <berend@compuserve.com>

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jan 5 01:39:04 1998 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.19: +10 -25 lines
Diff to previous 1.19 (colored)

o Allow the use of HISADDR as the first arg to "add".
o Allow a forth argument in ppp.secret, specifying a new
  label.  This gives control over which section of
  ppp.link{up,down} is used based on the authenticated user.
o Support random address ranges in ppp.secret (not just in ppp.conf).
o Add a AUTHENTICATING INCOMING CONNECTIONS section to the man page.
o Add a bit more about DEFLATE in the man page.
o Fix the incorrect "you must specify a password in interactive
  mode" bit of the manual.
o Space things in the man page consistently.
o Be more precice about where you can use MYADDR, HISADDR and INTERFACE
  in the "add" command documentation.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 30 23:22:35 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

Allow "set device" to close the open modem if we're in
interactive mode.
Use `netfd' in fcntl() and tc[gs]etattr() calls rather than
the hard coded descriptor 0.
Use _FILENO constants from unistd.h

This un-breaks things after my recent `close(0)' in interactive
mode.

Close STDIN_FILENO, and open _PATH_TTY O_RDONLY as `netfd'.  This
has the effect of allowing `show route' to output more than about
a page of data (on FreeBSD, not OpenBSD....).  I have no idea why,
except that it was a direct consequence of the tcsetattr() in
TtyCommandMode().  My previous fix (closing descriptor 0) `fixed'
this because all calls to tcsetattr() failed :-(

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 30 20:03:03 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.17: +8 -6 lines
Diff to previous 1.17 (colored)

Use inet_aton() before gethostbyname()

Suggested by: Christian Sandberg <christian@yes.no>
              Eivind Eklund <perhaps@yes.no>

Revision 1.17 / (download) - annotate - [select for diffs], Tue Dec 30 02:45:05 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.16: +9 -5 lines
Diff to previous 1.16 (colored)

Allow "add! dst mask gw" (note the ``!'') to do an
RTM_CHANGE if the RTM_ADD fails with an EEXIST.
Allow "delete! dst" (note the ``!'') to silently
fail if the RTM_DELETE fails with an ESRCH.
Also, make the ESRCH and EEXIST error conditions
more understandable to the casual observer.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 29 22:23:04 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.15: +8 -2 lines
Diff to previous 1.15 (colored)

Show how much time is left before timing out in the
`show timeout' output.
Remove ipIdleSecs variable - it's not used.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Dec 27 13:45:18 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Show who closes the diagnostic connection.
Show the IP range (if specified) in "show ipcp".
Close unused descriptors 0 and 2 in interactive mode.
Pass (size_t *) rather than (int *) to sysctl().

Revision 1.14 / (download) - annotate - [select for diffs], Sat Dec 27 07:22:16 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.13: +13 -15 lines
Diff to previous 1.13 (colored)

Allow (and document) execution of commands from within
our chat script.
You can now even run chat(8) - see ppp.conf.sample.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 24 09:30:27 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.12: +23 -23 lines
Diff to previous 1.12 (colored)

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

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

Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 23 22:38:01 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)

Suggested by: Philippe Charnier <charnier@lirmm.fr>
              Theo de Raadt <deraadt@cvs.openbsd.org>

Revision 1.11 / (download) - annotate - [select for diffs], Sun Dec 21 03:15:53 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.10: +4 -6 lines
Diff to previous 1.10 (colored)

Allow multiple (comma seperated) devices on the "set device" line.
Submitted by: Derek Inksetter <derek@saidev.com>

Revision 1.10 / (download) - annotate - [select for diffs], Fri Dec 19 18:12:08 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

Reset our "ifaddr" to zero if the "set ifaddr" fails in
-auto mode.  This makes ppp correctly exit if you kick it
off twice in auto mode with the same label (read: interface).

Revision 1.9 / (download) - annotate - [select for diffs], Thu Dec 18 01:10:25 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

Replace

  strcpy(a, b);  /* a and b are the same size */

with

  strncpy(a, b, sizeof(a));
  a[sizeof(a)-1] = '\0';

Making the code `correct at a glance'.

Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>

Revision 1.8 / (download) - annotate - [select for diffs], Thu Dec 18 00:28:48 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.7: +8 -1 lines
Diff to previous 1.7 (colored)

Don't log the actual password when command-logging
"passwd xxxx".

Revision 1.7 / (download) - annotate - [select for diffs], Wed Dec 17 21:17:44 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.6: +28 -12 lines
Diff to previous 1.6 (colored)

o Log ******** instead of the actual password for "set authkey"
  when command logging is switched on.
o Display ******** for the authkey for "show auth"
o Document how \P should be used, and document the other chat escapes
  while I'm there.
o Make sure the full command is displayed when a compound command
  fails - ie, "set novar rubbish" should say "set novar: Invalid command"
  rather than "novar: Invalid command"

Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org> (among others)

Revision 1.6 / (download) - annotate - [select for diffs], Wed Dec 17 00:20:36 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Fix a potential overflow where, if the label passed on the command
line is > LINE_LEN (512 bytes), we scribble (*blush*).

Hinted at by: Theo de Raadt <deraadt@cvs.openbsd.org>

Change sprintf(buf, "fixedstring") to strcpy(buf, "fixedstring").

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 15 22:50:20 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Use LogWARN for command usage messages and unrecognised
commands, not LogCOMMAND.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 15 22:44:50 1997 UTC (26 years, 5 months ago) by brian
Branch: MAIN
Changes since 1.3: +25 -13 lines
Diff to previous 1.3 (colored)

Allow random IP number allocation to peer.
Validate the peers suggested IP by attempting to make a routing table
entry.
Give up IPCP negotiation if the peer NAKs us with an unusable IP.
Always SIOCDIFADDR then SIOCAIFADDR when configuring the tun device.
Using SIOCSIFDSTADDR allows duplicate dst addresses (which we don't
want)!!!
Allow up to 200 interface names (was 50) (now that ppp can play server
properly).

Cosmetic:
  Log unexpected CCP packets in the CCP log rather than the ERROR log.
  Log unexpected Config Reqs in the appropriate LCP/IPCP/CCP log rather
  than the ERROR log.
  Log failed route additions and deletions with WARN, not TCPIP.
  Log the option id and length for unrecognised IPCP options.
  Change some .Sq to .Ar in the man page.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Dec 8 20:09:06 1997 UTC (26 years, 6 months ago) by brian
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Correct usage of `add' and `delete'.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Dec 7 04:09:07 1997 UTC (26 years, 6 months ago) by brian
Branch: MAIN
Changes since 1.1: +36 -32 lines
Diff to previous 1.1 (colored)

Only allow one arg to `delete' - the mask & gateway aren't necessary.
Delete AF_LINK routes as well as AF_INET.
Allow the word `default' as the arg to `delete' or in place of the
first two args (dest & netmask) to `add'.
Accept INTERFACE as the third arg to `add'.

  You can now say `add default interface' to create a default route
  through the tun interface.  It's reported that subsequent bind()s
  will bind to a broadcast address and not to the address currently
  assigned to the tun device - this is the first step towards
  supporting that first connection that was around from before the
  dynamic IP negotiation....

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Nov 23 20:27:33 1997 UTC (26 years, 6 months ago) by brian
Branch: BRIAN
CVS Tags: PPP1_5
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

Import version 1.5 of ppp.

<sales>
This is a user-level ppp implementation that uses the
tun driver.  It was originally created by a Japanese
ISP.  It's now piled with features.  Check the man pages
for details.
</sales>

The sources are identical to the ones in FreeBSD, except
for the Makefile.

IP aliasing (NAT) is disabled, and can be enabled by simply
doing a ``make install'' of libalias, then rebuilding
ppp.  I'll create libalias as a port soon.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 23 20:27:33 1997 UTC (26 years, 6 months ago) by brian
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.