Commit Graph

1115 Commits

Author SHA1 Message Date
Brian Somers
17e57a5fe3 Correct a bad bug in m_prepend()
Submitted by: luoqi
2000-05-07 10:08:24 +00:00
Brian Somers
328ecc101e Remove a rogue space 2000-04-13 00:00:46 +00:00
Brian Somers
9bf01bcb6c Add a missing ``break'' 2000-04-09 18:27:08 +00:00
Brian Somers
b42135dee3 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 Somers
c8f30703cd 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
Gary Jennejohn
27173c13e8 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 Somers
2a8e2fe669 Plug two file descriptor leaks 2000-04-03 19:56:49 +00:00
Gary Jennejohn
8810489433 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 Somers
e9d0dd0a1b 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 Somers
804e0a12f2 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 Somers
4c2b812c39 Undo the damage done to this file in my last commit 2000-03-31 14:31:36 +00:00
Brian Somers
b7d8533c16 Add the ``nat target'' command. 2000-03-31 14:26:23 +00:00
Brian Somers
9962fa3956 Correct address parsing
Pointed out by: Maxim Sobolev <sobomax@altavista.net>
2000-03-30 10:46:20 +00:00
Brian Somers
b565321aa1 Log information about packets being dropped (probably due to
``nat deny_incoming yes'') by libalias.
2000-03-29 09:31:52 +00:00
Brian Somers
6578fcf3f3 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 Somers
0e20b8777c Mention the value of the unexpected return code in nat_LayerPull() 2000-03-29 00:14:24 +00:00
Brian Somers
f3a0d054fe don't treat # specially if PARSE_NOHASH is passed 2000-03-28 15:14:15 +00:00
Brian Somers
effc341fe3 Don't treat # specially here 2000-03-28 15:11:38 +00:00
Brian Somers
5a83ad1eb1 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 Somers
5a8b6a98df 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 Somers
4b567bf209 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 Somers
3ce91245fc 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 Somers
0cd8e9020a 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 Somers
a1f961d3a3 Add some diagnostics to prove that incoming IP fragments are
being dealt with correctly.
2000-03-19 12:37:27 +00:00
Brian Somers
311a9da249 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 Somers
2793563fc4 Increase bit fields to allow for new values 2000-03-14 20:11:45 +00:00
Brian Somers
959d90ef1d 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 Somers
a60f44db18 Understand -DNOINET6 2000-03-14 19:33:13 +00:00
Brian Somers
2a30e2ac0b Understand environment variables in commands
Submitted by: Mark Knight <markk@knigma.org>
2000-03-14 01:47:31 +00:00
Brian Somers
d568d6c405 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 Somers
574a3ffd78 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 Somers
209dc10239 Fix some printf-style argument bugs 2000-03-14 01:47:19 +00:00
Brian Somers
ceecaea3de Fix some typos
Obtained from: OpenBSD
2000-03-14 01:47:13 +00:00
Brian Somers
499640f195 Adjust whitespace 2000-03-14 01:47:11 +00:00
Brian Somers
b9fa960d93 Don't include netinet6/in6.h directly. 2000-03-14 01:47:09 +00:00
Brian Somers
8e7bd08ea4 Correct some typos introduced in the descriptor -> fdescriptor change. 2000-03-14 01:47:07 +00:00
Brian Somers
10e629b937 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 Somers
f84f2c0057 Correct UN_SIZE definition
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
2000-03-14 01:46:58 +00:00
Brian Somers
24731321e6 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 Somers
d6d3eeab46 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 Somers
52c9ca1968 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 Somers
6b4579784c 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 Somers
6b38466448 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 Somers
76ce2d4bcb 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 Somers
e722aa17f8 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 Somers
f013f33ee2 To avoid namespace polution in NetBSD:
``struct descriptor'' -> ``struct fdescriptor''
2000-03-14 01:46:09 +00:00
Kris Kennaway
38e1809ae3 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 Kennaway
bb49f794f5 Buildworld fixes for NO_OPENSSH and NO_OPENSSL
Approved by:	jkh
2000-03-09 06:29:05 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Mark Murray
ec81a4cee3 Update DISTRIBUTION for new crypto world order 2000-02-29 11:44:18 +00:00