Commit Graph

14 Commits

Author SHA1 Message Date
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 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 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 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
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
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
martin 308d03266a Make this interface cloning. 2001-09-04 20:41:32 +00:00
martin 74f0920eda Take into account the two byte PPP protocol discrimator following the PPPoE
header when calculating the MTU. Ooops...

Thanks to Mario Kemper for noting this.
2001-06-24 20:35:50 +00:00
martin 91a63a0595 Protect interface queue manipulations by splnet(). Splsoftnet() is not
enough.
2001-06-18 12:32:47 +00:00
itojun 4d51fe368b change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
2001-06-14 05:44:23 +00:00
martin b5b75a7d19 Add an in-kernel PPPoE (ppp over ethernet, RFC 2516) implementation,
based on the existing net/if_spppsubr.c stuff.

While there are completely userland (bpf based) implementations available,
those have a vastly larger per packet overhead thus causing major CPU
overhead and higher latency. On an i386 base router, running a 486DX at 50MHz
my line (768kBit/s downstream) was limited to something (varying) between 10
and 20 kByte/s effective download rate. With this implementation I get full
bandwidth (~85kByte/s).

This is client side only. Arguably the right way to add full PPPoE support
(including server side) would be a variation of the ppp line discipline and
appropriate modifications to pppd. I promise every help I can give to anyone
doing that - but I needed this realy fast. Besids, on low memory NAT boxes
with typically a single PPPoE connection, this implementation is more
lightweight than a pppd based one, which nicely fits my needs.
2001-04-29 09:50:36 +00:00