Commit Graph

929 Commits

Author SHA1 Message Date
martin da249d7da1 Implement a retry counter for failed authorizations and limit it to
a configurable maximum (default: 5).

Some ISPs shut down accounts (at least temporarily) after to many bad
retries. This hit me recently due to a stupid pilot error and the fast
retry rate.
2002-01-07 10:49:02 +00:00
martin 45514531fd Implement an activity timestamp, recording the last time payload data
passed through.

Implement optional idle timeout.
2002-01-06 20:14:29 +00:00
thorpej ce4f05c0a3 Fix LP64 printf format problem. 2002-01-05 19:26:44 +00:00
martin a9309d4f18 Ooops, forgot to commit this file when doing the great if_spppsubr.c
rotottil. Thanks to Launey Thomas for pointing this out.
2002-01-05 00:54:07 +00:00
martin 99772f59c4 Move net/if_sppp.h to net/if_spppvar.h, create a new net/if_sppp.h
containing the userland visible thinks (i.e. ioctl definitions).

Remove all (both) old ioctls, as they had a brain dead API and made keeping
binary compatibility more or less impossible.

Replace by several new ioctls. While there, remove any arbitrary limits
(resulting from the old, broken ioctls) and allow any length of names
and passwords.
2002-01-04 12:21:24 +00:00
thorpej 17da611b51 Fix a "pointers are not permitted as case values" gcc 3.1 warning. 2001-12-31 21:55:46 +00:00
thorpej c9dee7e411 Do not provide memcpy()/memset()/memcmp() macros as wrappers
around b*() functions (!!).
2001-12-23 22:36:16 +00:00
itojun 745e191850 move protosw fragment for gif/stf to their own source code.
reduce #ifdef in stf code.  sync with kame
2001-12-21 03:21:50 +00:00
itojun 14dad29d69 whitespace and comment. sync with kame 2001-12-21 02:50:02 +00:00
martin 61eb776b48 Remove yet another spurious (debug?) output. 2001-12-16 23:55:28 +00:00
martin b2bd90b630 Cleanup softc more completely on "ifconfig down", but only if we are
currently in a connection reestablishement state.

The previouse (incomplete/unconditional) cleanup confused the state machine.
2001-12-16 23:53:31 +00:00
martin 729b826ecd Fix packet accounting (now netstat -i and netstat -ib show reasonable
values).

Implement a secondary connection-reestablishement mode, which is only
entered after (1) we have successfully transfered payload data over this
connection and (2) if initial retries did not reestablish a session.
In this mode we retry (infrequently) forever, until adminstrator stops
us (by "ifconfig ppppoe0 down"). XXX - need to display this mode in
pppoectl.

It is now possible to pull the DSL modems plug for say 15 minutes, plug
it back in again and just wait. The connection will be reestablished within
three minutes.
2001-12-16 11:40:52 +00:00
martin c8006a73d3 Remove some spurious (debug?) output. 2001-12-16 00:55:40 +00:00
martin 7801c694b0 Enable additional error messages for the discovery phase, clarify some
others. Change one timeout slightly - we need to make all others user
settable.
2001-12-15 20:43:31 +00:00
martin f19c69323c Make reconnects after LCP keepalive detected an error actually work. 2001-12-15 20:40:37 +00:00
thorpej f77397d481 Use __sh__ instead of __sh3__. 2001-12-14 23:30:02 +00:00
martin 8b3d9b9497 Enable active LCP keepalive handling in the PPP layer, the PPPoE layer
itself has no means to detect broken connections.
2001-12-10 23:23:24 +00:00
martin 0099682916 Now that everything works without LINK1 set, do not set it by default.
While here, remove an unnecessary splnet()/splx() pair.
2001-12-10 00:24:12 +00:00
martin d585188042 We explicitly close LCP when going to state CLOSED, so we better open
it again when going from INITIAL to STARTING. This has been done for
passive or auto-conecting interfaces always, but not for permanent
ones.

This fixes session reestablishement for PPPoE interfaces without LINK1 set,
and probably also closes PR kern/11161.

Thanks to Jared D. McNeill and Ross Harvey for sugesting debug methology.
2001-12-10 00:22:21 +00:00
martin b1554100e7 Change the way IPCP negotiation is handled.
Collect both local and remote address and set them to the interface in
one step (the peer adress was not set at all before).

This causes the peer address now to show up on the interface and all
messages to the routing socket to be send with correct data. The latter
has been the last missing piece to complete PPPoE support.
2001-12-08 19:46:39 +00:00
ross cbaa950b62 code cleanup for portability 2001-12-04 21:32:15 +00:00
abs 42ceb2f007 Add an #if defined(INET) ... around if_detach_queues's declaration to match the
one around its definition.
2001-12-02 19:44:25 +00:00
martin 6e766675c6 Fail early when trying to identify a pppoe interface softc (from a
HOST UNIQUE token) and our list of interfaces is empty. Without this
test an unitinalized pointer may be dereferenced.
2001-12-01 18:25:23 +00:00
augustss 113024244c Make it compile in the absence of networks. Closes PR 14274 (mine). 2001-11-27 17:32:57 +00:00
martin 86c6c53869 Sanity check the tunnel route after computing it and don't mark the
interface up if there is no route or the route loops back to ourself.
This helps to avoid pilot errors which would result in kernel stack
overflows.
2001-11-24 15:46:08 +00:00
martin c21931cf1d Make this respect down interfaces. 2001-11-24 00:21:27 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
thorpej 1e6d430c86 Someone <sys/param.h> was deleted from the includes list. Add it
back so that this file compiles again.
2001-11-15 07:01:27 +00:00
lukem 64a432d965 remove unnecessary #if NFOO > 0 .... #endif wrappers 2001-11-13 00:49:35 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
bjh21 3048d543d3 Use the (not so-)newly-allocated IFT_ECONET rather than IFT_OTHER. This means
that programs start printing Econet link-layer addresses corrctly.
2001-11-12 20:19:04 +00:00
bjh21 54407dd7d8 Sync with IANA. This finally gets us IFT_ECONET. 2001-11-07 12:14:17 +00:00
itojun 087b694325 too many curly brace. 2001-11-06 08:14:27 +00:00
matt b26f63f404 Fix pr#14481 2001-11-06 06:26:34 +00:00
matt b5e785f38d Switch to using queue access macros instead of refering to the member
fields explicitly.
2001-11-05 18:02:15 +00:00
atatat 6e885d365a Turn the tun device/network interface into a cloning device. 2001-10-31 20:08:17 +00:00
martin 4e61daf35e In preparation for further changes: remove big parts of the ifdef mess
for OSes we no longer share this file with.
2001-10-29 19:15:48 +00:00
simonb 5f717f7c33 Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.
2001-10-29 07:02:30 +00:00
martin d1f0e4f6e4 Don't call if_alloc_sadl when creating the pppoe interface, it's called
from sppp_attach.
When destroying the interface, call sppp_detach for proper cleanup.
This avoids a crash from the slow timeout handler for no longer existing
interfaces (spotted by Rémi Zara).
2001-10-28 09:48:20 +00:00
matt 1ebf8505b2 Add ETHERTYPEs for MPLS (Unicast & Multicast). 2001-10-18 21:29:19 +00:00
itojun dfb1429789 unifdef OLDIP6OUTPUT 2001-10-17 08:23:05 +00:00
itojun 3594efccf6 on RTM_DELETE, reduce refcnt on rt->rt_parent, to avoid leaks.
from IIJ seil team
2001-10-16 02:42:36 +00:00
simonb 0fbef69268 Put the storage class first in an array declaration. 2001-10-14 00:39:09 +00:00
thorpej 5b01f60e5b The bridge driver does all forwarding at interrupt level, and
does not use software interrupts; remove these bridge netisr
hooks left over from a previous incarnation of the bridge code.

Noted by Andrew Brown <atatat@atatdot.net>.
2001-10-06 15:46:33 +00:00
bjh21 25d06cf184 Install net/ieee1394.h the same way we install all the other
link-layer-specific headers.
2001-10-05 12:37:39 +00:00
itojun 6374da40e1 don't softintr_disestablish twice.
previous code panic'ed with the following command sequence:
# ifconfig gif0 create tunnel A B
# ifconfig gif0 deletetunnel
# ifconfig gif0 destroy
2001-09-26 07:54:19 +00:00
onoe b7c46d6199 use ALIGNED_POINTER() instead of ALIGN().
The type of ALIGN() is vary on architecture and casting pointer to u_int
is incorrect for MI code.
Since the code is to make sure aligned access to IP header and requires
bcopy if the test fails.  So the performance implication is not necessary
and we can use ALIGNED_POINTER() here.
pointed out by nathanw.
2001-09-25 01:07:53 +00:00
reinoud 78b6ed208e Change the caddr_t to uintptr_t and remove the cast ... it gave problems
compiling on an LP64 ... discussed with Gimpy, atatat and bleeh
2001-09-24 21:47:57 +00:00
onoe b698d56d3c Move IBSS creation stuff from awi to ieee80211. 2001-09-20 13:54:43 +00:00
onoe aebd449baa Fix for FH infrastructure mode.
XXX: FH chanset should be calculated by FH hop pattern, but BayStack 650 AP
     always specify chanset to fixed value 1.  The previous code try to this
     hack into awi driver, but it is insufficient because the chanset value
     in awi driver may change while scan and it may be different from the
     value in receiving beacon/probe-response.  So we save encoded FH chanset
     into channel in 802.11 common bss information for now.
2001-09-19 04:09:54 +00:00