Commit Graph

903 Commits

Author SHA1 Message Date
brian
c4b2f80d92 Remove a rogue space 2000-04-13 00:00:46 +00:00
brian
eb7aa2809f Add a missing ``break'' 2000-04-09 18:27:08 +00:00
brian
825b93bffd When running ppp -background, show comfort messages showing
when we're redialing/reconnecting.

While we're here, log redial, reconnect and phone number
announcements to LogCHAT, and reduce some other logging to
LogDEBUG.
2000-04-07 23:46:14 +00:00
brian
9b2d3e1632 I didn't get this right the last time....
When an NCP reaches TLF, *ONLY* datalink_Close() links that are
in DATALINK_OPEN.

When the last link reaches TLD, DOWN all NCPs (as we used to in the
links TLF (which was the wrong place anyway)), as the NCPs aren't
now going to datalink_Close() us unexpectedly, we get to continue
doing what we were told to do in the first place.

The result:  When we lose a link, the IPCP layer goes down and
we actually call the stuff in ppp.linkdown !
2000-04-06 10:03:48 +00:00
gj
8efc52e239 Pass me the pointy hat.
It was not a good idea to remove csu_header from struct cspace, it had
ramifications which I didn't notice.

Restore src/usr.sbin/ppp/slcompress.h to the way it was, since MAX_HDR
was already defined as 128 there and it's a user program anyway.

In sys/net/slcompress.h make MAX_HDR 128 intead of MLEN to avoid
bloat.

My apologies for any inconvenience.
2000-04-04 09:20:53 +00:00
brian
56ae0558f5 Plug two file descriptor leaks 2000-04-03 19:56:49 +00:00
gj
08bbcfe72f Nuke csu_hdr from struct cspace. csu_hdr is not used anywhere in the
tree. This considerably reduces unnecessary bloat in struct slcompress.

I'm running with this change right now and have seen no negative
side-effects.

On my sytem this reduced kernel BSS by about 25KB.

Submitted by:	bde
Approved by:	brian for user-ppp
2000-04-03 19:54:33 +00:00
brian
2b63c0a8d4 Allow authname to be changed at any phase, just emit a warning
if it's not DEAD or ESTABLISH
2000-03-31 21:08:43 +00:00
brian
c4adf04181 Use INADDR_NONE with PacketAliasSetTarget() if no args are given to
``nat target'', and suggest the use of ``nat target default'' as an
interesting possibility.
2000-03-31 20:42:24 +00:00
brian
408c8069a6 Undo the damage done to this file in my last commit 2000-03-31 14:31:36 +00:00
brian
542750c808 Add the ``nat target'' command. 2000-03-31 14:26:23 +00:00
brian
96a4cabd64 Correct address parsing
Pointed out by: Maxim Sobolev <sobomax@altavista.net>
2000-03-30 10:46:20 +00:00
brian
a12619f868 Log information about packets being dropped (probably due to
``nat deny_incoming yes'') by libalias.
2000-03-29 09:31:52 +00:00
brian
657714f28b Allow the use of hostnames instead of (and as well as) IP
numbers in all commands.
If people use hostnames and have dodgy resolvers or try to resolve
the hostname before the link is up, they get what they deserve....

Requested by: ru
2000-03-29 09:31:27 +00:00
brian
a252b602e2 Mention the value of the unexpected return code in nat_LayerPull() 2000-03-29 00:14:24 +00:00
brian
2442f64e8a don't treat # specially if PARSE_NOHASH is passed 2000-03-28 15:14:15 +00:00
brian
7d12e18643 Don't treat # specially here 2000-03-28 15:11:38 +00:00
brian
b192194923 Correct the parent notification diagnostic emitted from the child
process in -background mode (it should report failure if appropriate).
2000-03-22 03:02:01 +00:00
brian
76f86d4850 If a links LCP FSM has reached TLF and it's the last link,
don't bother to re-initialise the NCPs.  Instead wait for
bundle_LinkClosed() to be called - IFF it actually is called.

By initialising the NCPs at this point, ppp was recursing
back into the fsm_Down() routing for the link, and losing
track of the reason that the link was being brought down.
The end result was that ``set reconnect'' would never do
anything.

Patiently pointed out by: ru
2000-03-22 03:02:00 +00:00
brian
1ae09dfce5 Don't bother setting the dial timer if we've closed a
background/foreground/direct and zero'd the redial/reconnect
counts.
2000-03-22 03:01:56 +00:00
brian
5bda7f13ae Do some vfork() trickery so that the parent can determine
if the childs exec() has succeeded or failed by taking advantage
of the fact that both processes share the same memory.

FWIW:
  I tried to implement this by doing a pipe(), setting the
  write desciptors close-on-exec flag in the child and writing
  errno to the descriptor if the exec() fails.  The parent can
  then ``if (read()) got errno else exec worked''.

  This didn't work though - the child could write() to fd[1] on
  exec failure, but the parent got 0 trying to read() from fd[0] !
  Is this a bug in execve() ?
2000-03-22 03:01:53 +00:00
brian
b47896e800 Call bundle_CleanDatalinks() after UpdateSet() in case we're
dropping out of background/foreground/direct mode.

This avoids either having to wait for the redial timer before
exiting or jaming up in select() waiting for something that'll
never happen.
2000-03-22 03:01:48 +00:00
brian
e183eff0c8 Add some diagnostics to prove that incoming IP fragments are
being dealt with correctly.
2000-03-19 12:37:27 +00:00
brian
a93a4c8c88 Move a comment to make things a bit more readable.
Suggested by: sheldonh
Forgotten by: me
2000-03-16 16:28:27 +00:00
brian
e7643a6c06 Increase bit fields to allow for new values 2000-03-14 20:11:45 +00:00
brian
5f910a271b ppps -> ppp's; suggested by sheldonh
.Nm ppp -> .Nm; overlooked by me
Microsofts -> Microsoft's; OpenBSD
2000-03-14 20:04:32 +00:00
brian
a6c570880d Understand -DNOINET6 2000-03-14 19:33:13 +00:00
brian
583da493d5 Understand environment variables in commands
Submitted by: Mark Knight <markk@knigma.org>
2000-03-14 01:47:31 +00:00
brian
1bc8ab9f4f Add the ``resolv'' command for telling ppp how to deal with resolv.conf.
You can now ``resolv restore'' in ppp.linkdown !
Add DNS0 and DNS1 macros.
2000-03-14 01:47:27 +00:00
brian
041ec329dc Refresh the NAT IP pointer after a potential mbuf reallocation. This
caused frequent lock-ups for individual sessions over a NAT'd ppp link
when MTU sizes ended up more or less exactly wrong.
2000-03-14 01:47:21 +00:00
brian
19ff2ab337 Fix some printf-style argument bugs 2000-03-14 01:47:19 +00:00
brian
84a11d130e Fix some typos
Obtained from: OpenBSD
2000-03-14 01:47:13 +00:00
brian
621cd25162 Adjust whitespace 2000-03-14 01:47:11 +00:00
brian
e9ef0032ae Don't include netinet6/in6.h directly. 2000-03-14 01:47:09 +00:00
brian
11898ff77c Correct some typos introduced in the descriptor -> fdescriptor change. 2000-03-14 01:47:07 +00:00
brian
be63b17232 Introduce LOCALNAT and LOCALRAD defines so that the sources can stay
exactly the same in FreeBSD & OpenBSD despite libalias and libradius
being local to the ppp sources under OpenBSD.
2000-03-14 01:47:02 +00:00
brian
948b95cdbb Correct UN_SIZE definition
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
2000-03-14 01:46:58 +00:00
brian
1afd290619 Don't ``break'' when we come accross a non-RTM_IFINFO type
entry in the block returned by the NET_RT_IFLIST mib,
``continue''

Broken a few minutes ago by: me
2000-03-14 01:46:56 +00:00
brian
c905df5091 When ppp can't identify the relevant name, don't use "???", use
<nnn> or <0xxxx> instead.
2000-03-14 01:46:54 +00:00
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