Commit Graph

864 Commits

Author SHA1 Message Date
brian
3b65c00f32 Add ``set log dns'' to log DNS QUERY packets.
This is invaluable for dial-on-demand connections...
In ppp.linkup:

  set log -dns -tcp/ip

and in ppp.linkdown

  set log +dns +tcp/ip

giving a much better account of why the link came up.
2000-03-14 01:46:49 +00:00
brian
a69e155f87 The interface list that comes back from the PF_ROUTE/NET_RT_IFLIST mib
is aligned.  Teach this to ``show route''.

Clean up some of the sockaddr parsing routines.
2000-03-14 01:46:44 +00:00
brian
ca63a8dc14 Support IP6 addresses in ``show route''
Also, don't try to output routing entries if either the
RTA_DST or RTA_GATEWAY sockaddrs aren't present.
2000-03-14 01:46:38 +00:00
brian
56e902f033 When adjusting timer::rest, round to the closest TICKUNIT usecs
value.

This has minimal impact here, but if ppp ever needs to frequently
remove timers before they've timed out, it can badly skew the next
item in the timer list without this change.

The correct fix would be to store usecs in `rest' rather than
TICKUNITs, but the math is easier if we just round...
2000-03-14 01:46:34 +00:00
brian
1fa2af66ed When we stop a timer that's the first in the timer list, ensure
that we adjust that timers `rest' value (with the current getitimer()
values) before using that to adjust the next items `rest' value.
After adjusting that value, restart the timer service so that we've
now got the correct setitimer() values.
2000-03-14 01:46:31 +00:00
brian
9c5b52bb1f To avoid namespace polution in NetBSD:
``struct descriptor'' -> ``struct fdescriptor''
2000-03-14 01:46:09 +00:00
kris
3a01b4185c Remove the last vestiges of libRSAglue now that it's an empty stub.
This should fix the buildworld problems some people were seeing.

Approved by:	jkh
2000-03-11 22:34:10 +00:00
kris
0d1f47825b Buildworld fixes for NO_OPENSSH and NO_OPENSSL
Approved by:	jkh
2000-03-09 06:29:05 +00:00
sheldonh
244b8ead7d Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
markm
7b8bbfd16b Update DISTRIBUTION for new crypto world order 2000-02-29 11:44:18 +00:00
markm
4dfdc66cab Use libcrypto instead of libdes. 2000-02-24 21:10:28 +00:00
ru
3f518216d3 Unbroke the reference to libalias(3). 2000-02-05 15:25:15 +00:00
brian
a904c172cd Remove MAINTAINER=
I don't claim to own the code and certainly don't want to discourage
people from fixing or updating it.

[I know it's the 29th, but the FREEZE hasn't yet been posted to committers]
2000-01-29 11:08:00 +00:00
brian
4d672453af If we're in callback mode, don't forget this fact when we
get into datalink_Down().

Submitted by: David Hedley <david@inty.co.uk>
2000-01-27 00:40:25 +00:00
brian
299a0de13e Actually ignore comments at the end of lines - broken with the commit
that made ppp *not* treat #s in quoted arguments as comments.
2000-01-27 00:40:10 +00:00
brian
c14760c27b Handle the availability of TUNSIFHEAD. If it's there, use it.
For the moment this is just overhead, but it'll be used for INET6
support later.
2000-01-23 01:48:19 +00:00
brian
a29610fe9a Use TUNSIFPID when we change our PID (if it exists). 2000-01-21 00:33:27 +00:00
brian
0b5a924d7b Use AUTHLEN for the length of authname 2000-01-17 12:27:29 +00:00
brian
43392f74a4 Don't set ifaddr::in_addrs to 1 after an ``iface clear'' on an interface
with no addresses.
2000-01-07 03:47:12 +00:00
brian
cca6aa2264 include stdlib.h (setproctitle() is prototyped there in OpenBSD) 2000-01-07 03:23:38 +00:00
brian
604f6ce5b9 Call serial devices `cuaXX'' instead of `cuaaX'' (in line
with OpenBSD conventions).
2000-01-07 03:11:56 +00:00
brian
b0f0fe699d .Bl -tag requires -width too
Obtained from: OpenBSD
2000-01-07 03:11:42 +00:00
brian
a1f298998e Remove an unused #define 2000-01-07 03:11:31 +00:00
brian
928cb58803 Ensure that there's a bit of extra space in our buffer when it's
passed to libalias.  If there's not enough space, things like ftp
PORT commands start failing....

Reported by: Gianmarco Giovannelli <gmarco@giovannelli.it>
2000-01-03 20:09:23 +00:00
brian
d229c8a13c Increase M_MAXLEN from 2048 - sizeof struct mbuf to
4096 - sizeof struct mbuf, and set MAX_MRU and MAX_MTU
back to 2048.

2048 is big enough as an MTU/MRU, but we need to be able
to allocate larger mbufs after reassembling IP fragments.
1999-12-30 13:27:15 +00:00
brian
65f9d00aad Add a few missing #includes 1999-12-30 03:40:29 +00:00
brian
7a49c5353e Correct usages of getuid() and geteuid()
Pointed out by: billf
1999-12-30 03:36:11 +00:00
brian
00a339312b Mention that it's only necessary to escape the '-' in chat scripts
twice (once for the arg parsing and once to make it a normal character).
Make the man page example consistent.

Reminded by: Bryan Liesner <bleez@netaxs.com>
1999-12-29 22:31:10 +00:00
brian
5269dd341c Add a bunch of `const's and fix a typo.
Submitted by: Rich Neswold <rneswold@MCS.Net>
1999-12-27 11:54:57 +00:00
brian
8d3683f53b Don't allowt '#' as a comment when it's embedded in quotes:
set something "xxx yyy # zzz" aaa

shouldn't be interpreted as

  set something "xxx yyy" aaa
1999-12-27 11:43:31 +00:00
brian
0c62acb307 Don't bother fork()ing after closing a ctty if ppp is about to
terminate anyway.
1999-12-23 21:43:25 +00:00
brian
da8bf273f7 Understand double-quotes anywhere on a command line in the same
way that a shell does.  The previous way ppp did it just didn't
make any sense.
1999-12-23 21:43:12 +00:00
brian
d191496da2 Correct warning about unindented commands when the unindented command
is actually a new label with a comment at the end of the line.
1999-12-23 21:43:00 +00:00
brian
baf28880b3 Don't munge ``set dial|login|logout|hangup'' arguments before
ExpandString() has a chance to do its own substitutions.
1999-12-22 21:48:12 +00:00
brian
20cf74c9c7 Fix my '#'-at-end-of-lines change, spammed by a subsequent commit. 1999-12-20 20:47:58 +00:00
brian
89c7950e1a Use getpwuid()->pw_dir instead of $HOME when expanding ``~''. 1999-12-20 20:30:47 +00:00
brian
540cfa0f95 Use getpwuid() instead of getlogin() in ``allow users''. 1999-12-20 20:30:40 +00:00
brian
b6574956b6 Add missing linefeed. 1999-12-20 20:30:35 +00:00
brian
32de026316 Cosmetic: clean up some parenthesis confusion 1999-12-20 20:30:30 +00:00
brian
0a37c5b3ad Handle comments at the end of lines. 1999-12-20 20:30:25 +00:00
brian
4145fb0c1b Notice and warn about unterminated quoted strings in commands.
The entire command is ignored if the syntax is invalid...
1999-12-20 20:30:02 +00:00
brian
ff8174b1b3 Implement mbuf allocation internally by maintaining 8 buckets of
different sized mbufs, and mallocing them in chunks of 20 mbufs
at a time.

This improves back-to-back throughput by between 7 and 8%
1999-12-20 20:29:51 +00:00
brian
86f30d4f38 Cosmetic: Make struct mbuf more like kernel mbufs. 1999-12-20 20:29:47 +00:00
brian
e320900d11 Learn to do pointer arithmatic (doh!) 1999-12-18 02:31:36 +00:00
brian
0a9c037304 Handle PPPoPTY correctly. 1999-12-13 18:45:21 +00:00
brian
0646335b2f Be careful not to re-initialise `struct stat' while it still has
a running timer.  This fixes a problem where a dial is manually
aborted, the hangup script kicks in and the chat timer ends up
on the timer queue twice (tick tick tick tick *boom*)
1999-12-03 06:33:10 +00:00
brian
e483373e23 Change the way we transfer links (again). The previous
method avoided all race conditions, but suffered from
sometimes running out of buffer space if enough clients
were piled up at the same time.

Now, the client pushes the link descriptor, one end of a
socketpair() and the ppp version via sendmsg() at the
server.  The server replies with a pid.  The client then
transfers any link lock with uu_lock_txfr() and writev()s
the actual link contents.  The socketpair is now the only
place we need to have large socket buffers and the bind()ed
socket can keep the default 4k buffer while still handling
around 90 racing clients.
1999-11-30 23:52:37 +00:00
brian
80af32c97b depricated -> deprecated + mention the -alias flag status in README.changes 1999-11-29 18:53:43 +00:00
brian
8181bafa69 Don't try to do a DIALOUT in -direct mode or if there's no phone
numbers set.
1999-11-28 15:50:23 +00:00
brian
08e4eaabf2 Make -foreground a proper option (allowing ``allow mode foreground'',
``set mode foreground'' etc.
1999-11-28 15:50:08 +00:00