Revision tags: release/3.4.0_cvs |
|
#
2cb305af |
| 25-Nov-1999 |
Brian Somers <brian@FreeBSD.org> |
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 becam
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
show more ...
|
#
cf0a3940 |
| 17-Nov-1999 |
Brian Somers <brian@FreeBSD.org> |
Fix ``set proctitle'' by using setproctitle().
|
#
c0593e34 |
| 19-Oct-1999 |
Brian Somers <brian@FreeBSD.org> |
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 a
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.
show more ...
|
Revision tags: release/3.3.0_cvs |
|
#
97d92980 |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
67b072f7 |
| 19-Aug-1999 |
Brian Somers <brian@FreeBSD.org> |
o Add the -foreground switch. This switch behaves like -background except that ppp stays in the foreground. o Add the -quiet switch to quieten ppps startup o Add the -nat flag and discourage the u
o Add the -foreground switch. This switch behaves like -background except that ppp stays in the foreground. o Add the -quiet switch to quieten ppps startup o Add the -nat flag and discourage the use of the -alias flag. Both do the same thing. o Correct some nat usage strings. o Change the internal ``alias'' command to ``nat''.
show more ...
|
#
dade2407 |
| 17-Aug-1999 |
Brian Somers <brian@FreeBSD.org> |
Implement a minimum idle time value as an optional second argument to ``set timeout''. This is useful for situations where your minimum call charge is (say) 5 minutes (like mine is)
|
#
ab2de065 |
| 05-Aug-1999 |
Brian Somers <brian@FreeBSD.org> |
o Obsolete the undocumented ``set weight'' command. o If we're using RADIUS and the RADIUS mtu is less than our peers mru/mrru, reduce our mtu to this value for NetBSD too. o Make struct throughput
o Obsolete the undocumented ``set weight'' command. o If we're using RADIUS and the RADIUS mtu is less than our peers mru/mrru, reduce our mtu to this value for NetBSD too. o Make struct throughput's sample period dynamic and tweak the ppp version number to reflect the extra stuff being passed through the local domain socket as a result (MP mode). o Measure the current throughput based on the number of samples actually taken rather than on the full sample period. o Keep the throughput statisics persistent while being passed to another ppp invocation through the local domain socket. o When showing throughput statistics after the timer has stopped, use the stopped time for overall calculations, not the current time. Also show the stopped time and how long the current throughput has been sampled for. o Use time() consistently in throughput.c o Tighten up the ``show bundle'' output. o Introduce the ``set bandwidth'' command. o Rewrite the ``set autoload'' command. It now takes three arguments and works based on a rolling bundle throughput average compared against the theoretical bundle bandwidth over a given period (read: it's now functional).
show more ...
|
#
ac685e31 |
| 02-Jun-1999 |
Brian Somers <brian@FreeBSD.org> |
Introduce the ``keep-session'' option. Refer to the man page for details. This allows MP over non-tty devices where the original ppp process must not exit (such as sshd-spawned ppp sessions).
|
#
1d1fc017 |
| 01-Jun-1999 |
Brian Somers <brian@FreeBSD.org> |
Remember if MYADDR or HISADDR is used in a filter add tweak all filters any time either value changes.
|
Revision tags: release/3.2.0, release/3.1.0 |
|
#
972a1bcf |
| 28-Jan-1999 |
Brian Somers <brian@FreeBSD.org> |
Initial RADIUS support (using libradius). See the man page for details. Compiling with -DNORADIUS (the default for `release') removes support.
TODO: The functionality in libradius::rad_send_reques
Initial RADIUS support (using libradius). See the man page for details. Compiling with -DNORADIUS (the default for `release') removes support.
TODO: The functionality in libradius::rad_send_request() needs to be supplied as a set of routines so that ppp doesn't have to wait indefinitely for the radius server(s). Instead, we need to get a descriptor back, select() on the descriptor, and ask libradius to service it when necessary. For now, ppp blocks SIGALRM while in rad_send_request(), so it misses PAP/CHAP retries & timeouts if they occur.
Only PAP is functional. When CHAP is attempted, libradius complains that no User-Password has been specified... rfc2138 says that it *mustn't* be used for CHAP :-(
Sponsored by: Internet Business Solutions Ltd., Switzerland
show more ...
|
Revision tags: release/3.0.0, release/2.2.8 |
|
#
991c2a7b |
| 10-Dec-1998 |
Brian Somers <brian@FreeBSD.org> |
When using ``set device !someprogram'', when ``someprogram'' exits, it causes a select() exception. Handle these select() exceptions on link descriptors in pretty much the same way as loss of carrier
When using ``set device !someprogram'', when ``someprogram'' exits, it causes a select() exception. Handle these select() exceptions on link descriptors in pretty much the same way as loss of carrier rather than dropping out in confusion.
show more ...
|
#
004c6ac7 |
| 29-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Remove some redundant (#if 0'd) code.
|
#
0f781a72 |
| 27-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Add ``set proctitle'' for changing argv[0]. All substitutions are done in the same way as command execution.
For example, ``set proctitle USER INTERFACE PROCESSID'' would be useful in a -direct pro
Add ``set proctitle'' for changing argv[0]. All substitutions are done in the same way as command execution.
For example, ``set proctitle USER INTERFACE PROCESSID'' would be useful in a -direct profile for identifying who's connected.
show more ...
|
#
3535dfb0 |
| 26-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Shuffle the iface-alias option so that's in alphabetical order like the rest of the options.
|
#
3afe5ccb |
| 26-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Add ``enable proxyall'' support. This adds proxy ARP entries for every machine on every class C or smaller subnet that we route to. Add ``set {send,recv}pipe'' for controlling our socket buffer size
Add ``enable proxyall'' support. This adds proxy ARP entries for every machine on every class C or smaller subnet that we route to. Add ``set {send,recv}pipe'' for controlling our socket buffer sizes. Mention the IP number with the problem in a few error messages. All submitted by: Craig Leres <leres@ee.lbl.gov> Modified slightly by: me
show more ...
|
#
9b5f8ffd |
| 24-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Loosen our restrictions on setting enddisc, mrru, shortseq, authname and authkey.
o Auth{name,key} may additionally be set in PHASE_ESTABLISH. o The others may be set in PHASE_ESTABLISH as long as n
Loosen our restrictions on setting enddisc, mrru, shortseq, authname and authkey.
o Auth{name,key} may additionally be set in PHASE_ESTABLISH. o The others may be set in PHASE_ESTABLISH as long as no links have yet reached DATALINK_LCP.
show more ...
|
#
8fa6ebe4 |
| 22-Oct-1998 |
Brian Somers <brian@FreeBSD.org> |
Solve the ``first connection'' problem that occurs on demand-dial links with dynamic IP numbers where the program that causes the dial bind()s to an interface address that is subsequently changed aft
Solve the ``first connection'' problem that occurs on demand-dial links with dynamic IP numbers where the program that causes the dial bind()s to an interface address that is subsequently changed after ppp negotiation.
The problem is defeated by adding negotiated addresses to the tun interface as additional alias addresses and providing a set of ``iface'' commands for managing the interface. Libalias is also required (and what a name clash!) - it happily IP-aliases the address so that the source is that of the primary (negotiated) interface and un-IP-aliases it on the way back.
An ``enable iface-alias'' is done implicitly by the -alias command line switch. If -alias isn't given, iface-aliasing is disabled by default and can't be enabled 'till an ``alias enable yes'' is done. ``alias enable no'' silently disables iface-alias.
So, for dynamic-IP-type-connections, running ``ppp -alias -auto blah'' will work for the first connection, although existing bindings will not survive a disconnect/connect as the TCP peer will be trying to send to the old IP address - the packets won't route.
It's now a lot easier to add IPXCP to ppp with minor updates to the new iface.[ch] (if anyone ever gets 'round to it).
It's also now possible to manually add interface aliases with something like ``iface add 1.2.3.4/24 5.6.7.8''. This allows multi-homed ppp links :-)
show more ...
|
#
6f8e9f0a |
| 25-Aug-1998 |
Brian Somers <brian@FreeBSD.org> |
If we've got a full output buffer queue and cannot send anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues.
This should fix problems wher
If we've got a full output buffer queue and cannot send anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues.
This should fix problems where ``ppp -auto'' seems to stop responding after failing to connect to the peer a few times.
show more ...
|
#
92b09558 |
| 07-Aug-1998 |
Brian Somers <brian@FreeBSD.org> |
o Support callback types NONE, E.164, AUTH and CBCP. (see the new ``set callback'' and ``set cbcp'' commands) o Add a ``cbcp'' log level and mbuf type. o Don't dump core when \T is given in ``set l
o Support callback types NONE, E.164, AUTH and CBCP. (see the new ``set callback'' and ``set cbcp'' commands) o Add a ``cbcp'' log level and mbuf type. o Don't dump core when \T is given in ``set login'' or ``set hangup''. o Allow ``*'' and blanks as placeholders in ppp.secret and allow a fifth field for specifying auth/cbcp dialback parameters. o Remove a few extraneous #includes o Define the default number of REQs (restart counter) in defs.h rather than hardcoding ``5'' all over the place. o Fix a few man page inconsistencies.
show more ...
|
#
ba23f397 |
| 29-Jul-1998 |
Brian Somers <brian@FreeBSD.org> |
Allow an optional ``!'' in the open, dial & call commands. When used, the redial timer is ignored and the modem is opened immediately.
|
#
2062443f |
| 28-Jul-1998 |
Brian Somers <brian@FreeBSD.org> |
Silence ``Network unreachable'' warnings when using ``add .... HISADDR''. The network will never be reachable at this point unless we're in -auto or reading the command from ppp.linkup.
We can now
Silence ``Network unreachable'' warnings when using ``add .... HISADDR''. The network will never be reachable at this point unless we're in -auto or reading the command from ppp.linkup.
We can now run the following lines and get the expected results:
set ifaddr 1.2.3.4/0 5.6.7.8/0 add default HISADDR
where a route is added immediately in auto mode and the whole thing is delayed 'till the IP numbers have been agreed in other modes.
Essentially, ppp.linkup is no longer required.
show more ...
|
Revision tags: release/2.2.7 |
|
#
615ad4f9 |
| 27-Jun-1998 |
Brian Somers <brian@FreeBSD.org> |
Don't dlopen()/dlsym() libalias, use it in the same way as the rest of the world uses libraries.
|
#
899011c4 |
| 16-Jun-1998 |
Brian Somers <brian@FreeBSD.org> |
Don't bring the modem offline or hangup when ``down lcp'' is done. Instead, behave like ``close lcp''.
|
#
ff0f9439 |
| 12-Jun-1998 |
Brian Somers <brian@FreeBSD.org> |
o Maintain a link-type mask for open datalinks as well as for all datalinks in a bundle. Ppp now deals correctly with link types that are changed while open o When changing the type of the last
o Maintain a link-type mask for open datalinks as well as for all datalinks in a bundle. Ppp now deals correctly with link types that are changed while open o When changing the type of the last AUTO link, only clear the interface if we're not in PHASE_NETWORK. This allows us to switch to -ddial mode while we have a connection without suddenly unexpectedly throttling ourselves by clearing the interface configuration. Problem area noted by: Aaron Jeremias Luz <aaron@csh.rit.edu>
show more ...
|
#
da66dd13 |
| 06-Jun-1998 |
Brian Somers <brian@FreeBSD.org> |
Put the correct pid in /var/run/tunX.pid Suggested by: many
|