Commit Graph

1031 Commits

Author SHA1 Message Date
brian
51300009d4 e.g. -> e.g.,
Obtained from: OpenBSD
2000-06-23 09:48:02 +00:00
brian
52a3df56fb Correct PPPoE in multi-link mode
Submitted by: jason@OpenBSD.org
2000-06-22 20:51:03 +00:00
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
brian
a242c9a683 Increase bit fields to allow for new values 2000-03-14 20:11:45 +00:00
brian
420917259f 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
e8564a1fa4 Understand -DNOINET6 2000-03-14 19:33:13 +00:00
brian
f78172a3f5 Understand environment variables in commands
Submitted by: Mark Knight <markk@knigma.org>
2000-03-14 01:47:31 +00:00
brian
d3adbcad04 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
85512efa64 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
d915279bc0 Fix some printf-style argument bugs 2000-03-14 01:47:19 +00:00
brian
75fdce32f8 Fix some typos
Obtained from: OpenBSD
2000-03-14 01:47:13 +00:00
brian
cb839970d4 Adjust whitespace 2000-03-14 01:47:11 +00:00
brian
1a3b395845 Don't include netinet6/in6.h directly. 2000-03-14 01:47:09 +00:00
brian
249ed8d6eb Correct some typos introduced in the descriptor -> fdescriptor change. 2000-03-14 01:47:07 +00:00
brian
428154656b 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
b7053a7740 Correct UN_SIZE definition
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
2000-03-14 01:46:58 +00:00
brian
1670500994 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
30f1fc02c6 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
4f997528e5 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
59a92c2342 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
7de9fa217c 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
40c99babf2 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
593fa35a41 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
edc4275c39 To avoid namespace polution in NetBSD:
``struct descriptor'' -> ``struct fdescriptor''
2000-03-14 01:46:09 +00:00
kris
17ded40ab0 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
ff6d9a44ba Buildworld fixes for NO_OPENSSH and NO_OPENSSL
Approved by:	jkh
2000-03-09 06:29:05 +00:00
sheldonh
c0e8952a50 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
markm
fa09a31141 Update DISTRIBUTION for new crypto world order 2000-02-29 11:44:18 +00:00
markm
e8ccee3398 Use libcrypto instead of libdes. 2000-02-24 21:10:28 +00:00
ru
6ef70f5717 Unbroke the reference to libalias(3). 2000-02-05 15:25:15 +00:00
brian
fbfc1ea7b8 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
a8c2ce5f53 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
40bca11636 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
b6909567d5 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
a21a8432d2 Use TUNSIFPID when we change our PID (if it exists). 2000-01-21 00:33:27 +00:00
brian
5c9e39b6b3 Use AUTHLEN for the length of authname 2000-01-17 12:27:29 +00:00
brian
ece4520852 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
d9a3acdec8 include stdlib.h (setproctitle() is prototyped there in OpenBSD) 2000-01-07 03:23:38 +00:00
brian
9a7c321062 Call serial devices `cuaXX'' instead of `cuaaX'' (in line
with OpenBSD conventions).
2000-01-07 03:11:56 +00:00
brian
22986a9f97 .Bl -tag requires -width too
Obtained from: OpenBSD
2000-01-07 03:11:42 +00:00
brian
aebf883bbe Remove an unused #define 2000-01-07 03:11:31 +00:00
brian
66bb2bc917 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
a7351f7749 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
b23820d596 Add a few missing #includes 1999-12-30 03:40:29 +00:00
brian
f190d11c7d Correct usages of getuid() and geteuid()
Pointed out by: billf
1999-12-30 03:36:11 +00:00
brian
31e86e82d5 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
d4de4f097d 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
3c873744b6 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
0984e63638 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
411a73ca11 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
411436c45f 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
06587288d7 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
679bada5e7 Fix my '#'-at-end-of-lines change, spammed by a subsequent commit. 1999-12-20 20:47:58 +00:00
brian
654897b4bf Use getpwuid()->pw_dir instead of $HOME when expanding ``~''. 1999-12-20 20:30:47 +00:00
brian
2b12ad54f0 Use getpwuid() instead of getlogin() in ``allow users''. 1999-12-20 20:30:40 +00:00
brian
5bbfb9a312 Add missing linefeed. 1999-12-20 20:30:35 +00:00
brian
7a62d8a465 Cosmetic: clean up some parenthesis confusion 1999-12-20 20:30:30 +00:00
brian
d574ab6d26 Handle comments at the end of lines. 1999-12-20 20:30:25 +00:00
brian
3e6b8e10f7 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
5579308326 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
919d0f538f Cosmetic: Make struct mbuf more like kernel mbufs. 1999-12-20 20:29:47 +00:00
brian
17689cb175 Learn to do pointer arithmatic (doh!) 1999-12-18 02:31:36 +00:00
brian
920758ddf3 Handle PPPoPTY correctly. 1999-12-13 18:45:21 +00:00
brian
ee3f468587 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
9491d4a14b 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
90f2d067c1 depricated -> deprecated + mention the -alias flag status in README.changes 1999-11-29 18:53:43 +00:00
brian
c0de590a5c 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
ddd684a1a2 Make -foreground a proper option (allowing ``allow mode foreground'',
``set mode foreground'' etc.
1999-11-28 15:50:08 +00:00
brian
428643dd44 Allow extended pap success messages by believing in the PAP headers
length field rather than the one byte message length field embedded
in the packet.  This steps slightly outside of the protocol boundaries,
but should not cause any problems.

Limitation noted by: Simon Winwood <simon@winwood.org>
1999-11-26 22:44:45 +00:00
brian
3c65bdc9a6 Change ``set cd'' so that its default value is device specific. The
default is still 1 second for ttys, but is now 6 seconds for i4b (ISDN)
devices and 5 seconds for ethernet (PPPoE) devices.
1999-11-26 22:44:33 +00:00
brian
a5fa2f99ed Rewrite the link descriptor transfer code in MP mode.
Previously, ppp attempted to bind() to a local domain tcp socket
based on the peer authname & enddisc.  If it succeeded, it listen()ed
and became MP server.  If it failed, it connect()ed and became MP
client.  The server then select()ed on the descriptor, accept()ed
it and wrote its pid to it then read the link data & link file descriptor,
and finally sent an ack (``!'').  The client would read() the server
pid, transfer the link lock to that pid, send the link data & descriptor
and read the ack.  It would then close the descriptor and clean up.

There was a race between the bind() and listen() where someone could
attempt to connect() and fail.

This change removes the race.  Now ppp makes the RCVBUF big enough on a
socket descriptor and attempts to bind() to a local domain *udp* socket
(same name as before).  If it succeeds, it becomes MP server.  If it
fails, it sets the SNDBUF and connect()s, becoming MP client.  The server
select()s on the descriptor and recvmsg()s the message, insisting on at
least two descriptors (plus the link data).  It uses the second descriptor
to write() its pid then read()s an ack (``!'').  The client creates a
socketpair() and sendmsg()s the link data, link descriptor and one of
the socketpair descriptors.  It then read()s the server pid from the
other socketpair descriptor, transfers any locks and write()s an ack.

Now, there can be no race, and a connect() failure indicates a stale
socket file.

This also fixes MP ppp over ethernet, where the struct msghdr was being
misconstructed when transferring the control socket descriptor.

Also, if we fail to send the link, don't hang around in a ``session
owner'' state, just do the setsid() and fork() if it's required to
disown a tty.

UDP idea suggested by: Chris Bennet from Mindspring at FreeBSDCon
1999-11-25 02:47:04 +00:00
brian
2aeda99cbb Don't setuid() 'till we've called ID0setproctitle() 1999-11-23 00:14:50 +00:00
brian
2c7a1f86db Call MkSockNode() as uid 0
Forgotten by: julian
1999-11-21 23:27:23 +00:00
brian
a853a364d8 Don't compile NETGRAPH out of ppp for the release crunch 1999-11-20 10:55:27 +00:00
brian
a1c1bf8f7c Update the time delta of the first item in TimerList before
inserting a new item.  Without this, it's possible to
mis-insert quite badly... but only by as much as the load of
the first item, which is almost always 1 second.

Initialise the timerservice with `restart' set if we're inserting
at the start of the list.
1999-11-19 23:21:13 +00:00
brian
b484490afe Fix ``set proctitle'' by using setproctitle(). 1999-11-17 21:12:35 +00:00
brian
eb7a7a45a7 Remove some extraneous ifdefs, and don't try to put the socket in
O_NONBLOCK.  The select() is the best best as I don't want to muck
about with the send/receive thresholds.
1999-11-16 21:57:48 +00:00
brian
f6ac69f153 Use modfind() to check if a kld is already loaded.
Submitted mostly by: green
1999-11-16 21:57:34 +00:00
brian
5151d97759 Don't insist on 4 digit umasks in ``set server''.
Pointed out by: joerg
1999-11-13 16:18:40 +00:00
brian
7be13127ce Make the meaning of the provider part of the PPPoE device spec clearer. 1999-11-13 16:18:27 +00:00
brian
dc3ab5d742 Oops, netgraph.o -> ether.o for the RELEASE build. 1999-11-11 02:25:17 +00:00
brian
c5d2ca82c6 If dev->connected is already set to CARRIER_OK in ether_AwaitCarrier,
don't go and set it to CARRIER_LOST !
1999-11-09 23:30:59 +00:00
brian
e1e62f8cd4 Don't recurse into datalink_UpdateSet() after
doing a HangupDone().  The HangupDone() may fuel
bundle_CleanDatalinks(), and if so, the bogus
UpdateSet() ends up select()ing on a closed
descriptor.....

Change the main `do/while' loop to a `for' loop so
that any `continue's do the bundle_CleanDatalinks()
& bundle_IsDead() bit.
1999-11-09 23:21:47 +00:00
brian
64d12e8b5b Correct the ``-unix X'' parsing (last time I only corrected
``-unitX''.

Pointed out twice by: Gert-Jan Vons <gert-jan@bigfoot.com>
1999-11-09 21:59:09 +00:00
brian
a519ec330f Be a bit smarter when identifying a netgraph node
(don't dereference NULL).
1999-11-09 19:05:48 +00:00
brian
50dd1d29fc Don't treat -unit as a mode flag when counting mode flags.
Submitted by: Gert-Jan Vons <gert-jan@bigfoot.com>
1999-11-09 00:32:21 +00:00
brian
35e0fd3284 Add an empty netgraph.o when building a release to keep the
crunch stuff happy.

Breakage spotted by: phk
1999-11-09 00:16:30 +00:00
brian
b9908f0754 Don't zero-pad netgraph node ids
Recommended by: julian
1999-11-07 09:03:45 +00:00
brian
8bac1154cf Support PPPoE
Help (lots) from: julian, archie
Facilities from: ahebert@pubnix.net
1999-11-06 22:50:59 +00:00
brian
b3ddae2734 Introduce ``set logout''; another chat script. This is in preparation
for the abstraction of ``set dial'' and ``set hangup''.
1999-10-25 13:49:44 +00:00
brian
3c23268eff Don't (unnecessarily) parse wtmp, force ID0logout() to DTRT instead. 1999-10-25 13:31:42 +00:00
brian
aff584d577 Manually create a correct(*) entry in wtmp when logging out a PPPoTCP or
PPPoUDP connection.

(*) This is as correct as ftp and uucp wtmp entries are - that is,
multiple concurrent connections will not record enough information
in wtmp to tell last(1) who was logged in for how long.
1999-10-21 21:55:22 +00:00
brian
a960365ba9 If we're running ppp -direct over a tcp or udp connection,
record the IP number in the `from' slot and not the tty slot.
We put ``ppp'' in the tty slot - in line with what ftp (and
probably others) does.
1999-10-21 01:19:23 +00:00
brian
44b4c57a07 Don't go from PHASE_NETWORK to PHASE_ESTABLISH when we want to
re-open a device.  The fact that we're in NETWORK phase indicates
that there are other links in DATALINK_OPEN and that we don't want
to stop using them.
1999-10-21 00:19:33 +00:00
brian
492cd0a5e5 Add the -unit command line switch for specifying the tun device.
Warn about -alias being depricated (but still allow it).
Don't moan twice about failing to open any tun device.
Fix a diagnostic and add the -quiet switch to the usage message.
1999-10-19 15:21:09 +00:00
brian
366399cf8b Correct a few diagnostics 1999-10-16 13:28:04 +00:00
brian
5a964a75d5 Don't ntohl() the signature before printing it... it's already
been done.

Spotted by: Gert-Jan Vons <gert-jan@bigfoot.com>
1999-10-16 09:18:15 +00:00
brian
420eed68cc When more than one timer is expired at once, allow for the possibility
that the first timer ends up doing a timer_Stop() on the second.

When this happens, remove the timer from the pending list so that
we still call any subsequent timers.

This bug has been here for several years, but has only been tickled
recently with my device layering changes.

With enormous thanks for the perseverance of: Ruslan Ermilov <ru@ucb.crimea.ua>
1999-10-15 20:44:34 +00:00
brian
3b5db3e08a When we get the last NCP TLD, close all datalinks with CLOSE_STAYDOWN
rather than CLOSE_NORMAL.
1999-10-15 20:36:04 +00:00
brian
a7eff426e3 Redefine CRTS_IFLOW and CCTS_OFLOW on the mac.
Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
1999-10-15 20:30:44 +00:00
brian
79847cf7ae When uncompressing VJ-compressed frames, fix the ip_sum directly
in struct cstate rather than copying the stored header slot into a
potentially mis-aligned buffer then trying to update the ip_sum
without causing an exception on non-i386 hardware.

I've never been able to reproduce this problem, but it has been
reported by many people... besides, the code is now a bit cleaner.

Testing & patience by: Anthony Solovjoff <asolovjoff@hotmail.com>
1999-10-13 07:49:13 +00:00