Commit graph

1104 commits

Author SHA1 Message Date
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
Mark Murray 512182f3ff Use libcrypto instead of libdes. 2000-02-24 21:10:28 +00:00
Ruslan Ermilov dfd9528b30 Unbroke the reference to libalias(3). 2000-02-05 15:25:15 +00:00
Brian Somers cda4644c28 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 Somers 225e259db9 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 Somers d81cf7d011 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 Somers 3a7b6d76a7 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 Somers 06b47306d1 Use TUNSIFPID when we change our PID (if it exists). 2000-01-21 00:33:27 +00:00
Brian Somers 82de8666e1 Use AUTHLEN for the length of authname 2000-01-17 12:27:29 +00:00
Brian Somers 278657c32d 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 Somers 35099b5d17 include stdlib.h (setproctitle() is prototyped there in OpenBSD) 2000-01-07 03:23:38 +00:00
Brian Somers ff36f30c56 Call serial devices `cuaXX'' instead of `cuaaX'' (in line
with OpenBSD conventions).
2000-01-07 03:11:56 +00:00