summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow (and document) execution of commands from withinbrian1997-12-274-102/+281
| | | | | our chat script. You can now even run chat(8) - see ppp.conf.sample.
* Correct copyright.brian1997-12-244-96/+12
| | | | Requested by: Eivind Eklund <perhaps@yes.no>
* Cosmetic (style):brian1997-12-2424-162/+165
| | | | | | | sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
* Use sizeof cftypes128 for NCFTYPES128 macro, not sizeof cftypes !brian1997-12-241-2/+2
| | | | Lucky that sizeof cftypes < sizeof cftypes128
* strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)brian1997-12-236-16/+16
| | | | | Suggested by: Philippe Charnier <charnier@lirmm.fr> Theo de Raadt <deraadt@cvs.openbsd.org>
* Don't forget to ntohs(sin.sin_port) (DUH!)brian1997-12-221-3/+3
|
* Charles Mott created these (and told me via email thatbrian1997-12-214-8/+8
| | | | they were BSD copyright). Use his name, not mine.
* Add (BSD) copyright headers.brian1997-12-2127-59/+703
|
* Cosmetic: Test for comment lines after the lenght has been established.brian1997-12-211-4/+2
| | | | Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Allow multiple (comma seperated) devices on the "set device" line.brian1997-12-216-51/+81
| | | | Submitted by: Derek Inksetter <derek@saidev.com>
* Mention that leading whitespace is ignored when identifying comments.brian1997-12-212-4/+6
|
* Zero struct sockaddr_??s before filling them in.brian1997-12-211-1/+3
| | | | Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Allow leading whitespace before '#' when identifying comments.brian1997-12-211-1/+3
| | | | Submitted by: Dave Bodenstab <imdave@mcs.net>
* Cosmetic: Remove blank lines, add .Pp where necessary.brian1997-12-212-698/+92
| | | | Submitted by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Reset our "ifaddr" to zero if the "set ifaddr" fails inbrian1997-12-191-2/+4
| | | | | -auto mode. This makes ppp correctly exit if you kick it off twice in auto mode with the same label (read: interface).
* If the peer asks for IP 0.0.0.0, choose an IP ourselvesbrian1997-12-191-2/+3
| | | | | without looking for it in our IP list (and if found, trying to ifconfig it!).
* Replacebrian1997-12-183-6/+9
| | | | | | | | | | | | | 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>
* Don't log the actual password when command-loggingbrian1997-12-183-5/+42
| | | | "passwd xxxx".
* Don't depend on a u_long being 32 bits.brian1997-12-171-6/+9
| | | | Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
* char filename[200] => char filename[MAXPATHLEN]brian1997-12-171-2/+2
| | | | Pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Log the source of client connections to the diagnostic port.brian1997-12-171-8/+32
| | | | | | | Disallow connections from port numbers <1024 as low port numbers can only really mean trouble (ftp bounces etc.). Discussed at length with: Theo de Raadt <deraadt@cvs.openbsd.org>
* Remove useless comparison.brian1997-12-171-3/+1
|
* If we've got a descriptor table that's bigger than anbrian1997-12-171-1/+12
| | | | | | | | fd_set, make sure that all descriptors >2 are closed when we start - otherwise we're asking for a dump in FD_SET(). Problem pointed out by: Theo de Raadt <deraadt@cvs.openbsd.org>
* o Log ******** instead of the actual password for "set authkey"brian1997-12-174-43/+197
| | | | | | | | | | | | 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)
* Fix a potential overflow where, if the label passed on the commandbrian1997-12-172-5/+6
| | | | | | | | 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").
* Wrap long linesbrian1997-12-162-8/+10
| | | | Submitted by: Greg Lehey <grog@lemis.com>
* Correct return values from alias routines.brian1997-12-152-14/+18
|
* Use LogWARN for command usage messages and unrecognisedbrian1997-12-152-4/+4
| | | | commands, not LogCOMMAND.
* Do 2 passes when "delete all"ing. The first pass removesbrian1997-12-151-28/+54
| | | | | | | | | | | | | | all RTF_WASCLONED routes, and the second removes the others. This avoids the situation where we've added an RTF_CLONING route (such as ``default''), created some clones, then deleted the CLONING route before the WASCLONED route(s). Without the two passes, we get errno (not rtm_errno) set to ESRCH when deleting the WASCLONED route, despite the deletion succeeding ! Also: Enhance the route operation failure diagnostics. Make portability #ifdefs a bit more generic.
* Allow random IP number allocation to peer.brian1997-12-1318-143/+504
| | | | | | | | | | | | | | | | | | | | 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). Up the version number (1.5 -> 1.6). 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.
* Deal with inflate() returning avail_in == avail_out == 0brian1997-12-081-2/+18
| | | | | | | We must call inflate again in case there's any pending output despite our input buffer being empty. If the output buffer is in fact already flushed, inflate() returns Z_BUF_ERROR. There isn't really an error !
* Correct usage of `add' and `delete'.brian1997-12-081-2/+2
|
* Fix PAP, CHAP & LQR req (I broke the byte ordering whenbrian1997-12-073-16/+70
| | | | | | | | I did the deflate re-org). Make PAP & CHAP negotiation prettier in the log file. If both PAP & CHAP are `enabled' and the peer NAKs CHAP suggesting PAP, be friendly and REQ PAP the next time. This is in line with the rfc.
* Only allow one arg to `delete' - the mask & gateway aren't necessary.brian1997-12-074-126/+170
| | | | | | | | | | | | | | 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....
* Correct cftypes128 index.brian1997-12-061-2/+2
|
* Understand ``sockaddr_dl''s where sdl_nlen != 0brian1997-12-041-24/+25
|
* Remove duplicate REJECTED macro.brian1997-12-041-24/+18
| | | | Remove extraneous pointers.
* Initialize ccpstate when CCP comes down.brian1997-12-041-32/+19
| | | | Remove extraneous pointers.
* Parenthesise the REJECTED macro.brian1997-12-041-2/+2
|
* Identify rejected protocol types according to rfc1700.brian1997-12-041-4/+130
|
* Fix the CCP Type field value for DEFLATE.brian1997-12-038-48/+203
| | | | | | | | | | | | | | (I *really* meant to do this *before* committing the deflate changes in the first place - oops). Pppd is horribly broken in this respect - refer to the ppp man page for details. Ppp *WON'T* negotiate deflate with pppd by default - you must ``enable'' and ``accept'' ``pppd-deflate'' in your config. While I'm in there, update the cftypes in ccp.c so that we recognise some more protocols (we don't actually do anything with them - just send a REJ).
* Abstract the CCP layer a level.brian1997-12-0324-286/+1209
| | | | Add DEFLATE support.
* Display connect time as 0 if we've never beenbrian1997-11-261-3/+3
| | | | | connected. Pointed out by: Jeff Kletsky <Jeff@wagsky.com>
* Fix the help command (broken when I re-prototypedbrian1997-11-231-20/+33
| | | | all the commands).
* Up the version number to 1.5.brian1997-11-221-3/+3
|
* Understand how to derive the names of interfacesbrian1997-11-221-34/+28
| | | | | when they aren't ordered. This is probably vital for laptop support ;-I
* Fix prototypes.brian1997-11-2262-752/+823
| | | | | | | | | | | | | | 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).
* Allow zero args to "cvs log".brian1997-11-181-2/+2
|
* Fix interactive mode so that it doesn't require a passwd (again!).brian1997-11-181-1/+4
|
* Add throughput logging (disabled by default).brian1997-11-1812-234/+329
| | | | | Use "enable throughput" to see modem & IPCP throughput. Removed an extraneous prompt()
OpenPOWER on IntegriCloud