Commit Graph

929 Commits

Author SHA1 Message Date
brian
c3a9c24eb6 Remove ``nat pptp'' as this is now done transparently by libalias. 2000-06-20 12:18:40 +00:00
brian
b59e7d983a Allow padding in LQR ECHO requests
Problem found by: Tomaz Borstnar <tomaz.borstnar@over.net>
2000-06-20 09:13:25 +00:00
brian
8c1dfb34f4 Don't mis-match interface names in iface_Create()
Submitted by: Adrian Penisoara <ady@freebsd.ady.ro>
2000-06-19 21:43:48 +00:00
brian
e9f7666be9 Fix a printf-style format error 2000-06-18 10:07:53 +00:00
brian
55b0a886e9 A few more hard-sentence breaks. 2000-06-13 10:03:28 +00:00
brian
c0915d72a9 Hard sentence breaks and trailing space tidy-ups
Obtained from: OpenBSD
2000-06-11 14:58:32 +00:00
brian
af7ffee6a6 Don't oan about padding characters 2000-06-11 12:22:06 +00:00
brian
3f7563647e Add ``set ifqueue'' to control the size of the outgoing packet
queue.  Doing ``set ifqueue 0'' and ``set urgent none'' will allow
full use of luigi's WF2Q code.

Requested by: luigi
2000-06-11 02:30:51 +00:00
brian
80ef898669 Allow ``set urgent none'' to disable all urgent ports and IPTOS_LOWDELAY
prioritisation.

Requested by: luigi
2000-06-08 20:07:48 +00:00
brian
7a2bca9178 Use mp_CheckAutoloadTimer() rather than mp_StopAutoloadTimer()
when opening or closing an auto link due to the autoload
setting.

Spotted by: David Hedley <david@inty.co.uk>
2000-05-31 15:35:29 +00:00
brian
417651de21 Don't use the umask to chmod local domain server sockets, use
the mask
2000-05-31 09:06:52 +00:00
brian
94d7f542d3 If the fsm header reports a length greater than the packet size,
drop the packet rather than just whinging about it in the log.
If the fsm header has a smaller length, continue to whinge.
2000-05-26 21:11:55 +00:00
brian
c65570d0ec Remove an unused variable 2000-05-26 08:29:11 +00:00
brian
e2a1ed659e When we do a `dial'' or `open'' from DATALINK_READY, go to
DATALINK_CARRIER and turn off scripting.

This should fix instances where ``term'' is used followed by ~.
and then ``dial''/``open'' (it currently just sits there looking
at you).

Reported by: Tim Vanderhoek <vanderh@ecf.utoronto.ca>
2000-05-26 08:26:56 +00:00
brian
87fbca595a Fix a topy (if (expr); command;)
Submitted by:	Renaud Waldura <renaud@guppy.evolunet.com>
2000-05-25 16:12:55 +00:00
brian
e2a7babf23 The name /var/log/alias.log is *not* likely to change in the near
future...
2000-05-24 20:56:30 +00:00
brian
7aaa243061 Mention what ``enable proxy'' actually does 2000-05-24 13:49:39 +00:00
brian
6899e8caf1 Honour `set speed sync'' and `set device !program'' when
used together by creating a SOCK_DGRAM socketpair() between
the processes.

Be polite when closing !program links and send a HUP to the
process.  This makes ssh tunnels over unreliable media (such
as via httptunnel) reconnect properly.
2000-05-24 09:05:58 +00:00
brian
abac9c38ad Mention it in the log file when we HUP a process that
controls a link.
2000-05-24 09:05:45 +00:00
brian
be6a200b1c Don't attempt to fputs(NULL, fp) when ``enable dns'' is given and
there's no resolv.conf.
Use a umask of 022 when creating resolv.conf, not 0644 !
2000-05-24 01:00:24 +00:00
brian
b1cc5ff65b Always pass packets through libalias when NAT is enabled.
Submitted by: luoqi
Forgotten by: me
2000-05-23 14:55:08 +00:00
brian
514e3c0631 Return -2 when tcp_OpenConnection() fails so that ppp doesn't
report that the device name is of an invalid format.
2000-05-22 08:23:35 +00:00
brian
289449a26e Be more verbose when a second link doesn't match the first because the
peer enddisc/authname is different.
2000-05-22 08:23:13 +00:00
brian
0c78da8197 Fix a typo 2000-05-11 07:59:21 +00:00
brian
5c405ba5ac Mention that the default is to let external traffic route to
the internal network when NAT is enabled.

Allow ``set target MYADDR'' to stop packets at the gateway.
2000-05-11 07:55:44 +00:00
brian
798531b00d Correct a bad bug in m_prepend()
Submitted by: luoqi
2000-05-07 10:08:24 +00:00
brian
73913176c3 Remove a rogue space 2000-04-13 00:00:46 +00:00
brian
abc58da636 Add a missing ``break'' 2000-04-09 18:27:08 +00:00
brian
475c3d22fd 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
700211661b 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
843a6edcef 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
02c0d5570c Plug two file descriptor leaks 2000-04-03 19:56:49 +00:00
gj
db8a197791 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
94b8845e58 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
e1b76f86b3 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
bd3d7b42e7 Undo the damage done to this file in my last commit 2000-03-31 14:31:36 +00:00
brian
863fda1ec2 Add the ``nat target'' command. 2000-03-31 14:26:23 +00:00
brian
58892b0493 Correct address parsing
Pointed out by: Maxim Sobolev <sobomax@altavista.net>
2000-03-30 10:46:20 +00:00
brian
c344210572 Log information about packets being dropped (probably due to
``nat deny_incoming yes'') by libalias.
2000-03-29 09:31:52 +00:00
brian
13e2973a0f 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
cd54ce1f7e Mention the value of the unexpected return code in nat_LayerPull() 2000-03-29 00:14:24 +00:00
brian
bd7e905e35 don't treat # specially if PARSE_NOHASH is passed 2000-03-28 15:14:15 +00:00
brian
35bb317890 Don't treat # specially here 2000-03-28 15:11:38 +00:00
brian
471671e7b2 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
9fe1d07038 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
24152078e2 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
68b1475162 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
19cd9d0b18 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
f578b83396 Add some diagnostics to prove that incoming IP fragments are
being dealt with correctly.
2000-03-19 12:37:27 +00:00
brian
91b66530e9 Move a comment to make things a bit more readable.
Suggested by: sheldonh
Forgotten by: me
2000-03-16 16:28:27 +00:00