Commit Graph

68 Commits

Author SHA1 Message Date
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
tron ed14057f29 Adapt maximum MTU permitted on pppoe(4) interfaces to the MTU of the
connected ethernet interface.
2006-04-27 20:04:26 +00:00
tron 7604b6a404 Don't allow to connect a non ethernet interface to a PPPoE interface. 2006-04-27 13:19:04 +00:00
christos bd7ea99daf Don't try to free a NULL mbuf. 2006-04-15 02:22:44 +00:00
martin 0975a4b449 Make sure error messages (received from the access concentrator) are
zero terminated.
2006-01-31 23:50:15 +00:00
thorpej 63eac52bac ANSI function decls and application of static. 2005-12-11 23:05:24 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
martin ebe6c135ee Fix bogus uninitialized variable warning ifdef PPPOE_SERVER.
Noticed by Marcin Jessa on current-users.
2005-08-31 00:00:26 +00:00
christos 333e176687 - sprinkle const
- remove unneeded casts
- use more mem*() instead of b*() funcs.
2005-05-29 21:22:52 +00:00
perry f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
martin 5e83f0d7e8 Remove deleted interfaces from the instance list (inspired by an OpenBSD
change). While there, fix a comment.
2005-01-19 15:05:55 +00:00
martin 0a72984c77 Factor out softc cleanup after loss of session into pppoe_clear_softc.
Use this when loosing the ethernet interface (when it deataches).
Fixes PR kern/28375.
2004-12-08 07:43:29 +00:00
peter b9c49ebff1 Change ifc_destroy to return an int instead of void, so that it
can pass back errors to ifconfig.
2004-12-04 18:31:43 +00:00
skrll 4979a4d3be Re-order the inclusion of opt_pfil_hooks so PFIL_HOOKS gets set properly. 2004-11-28 17:16:10 +00:00
martin e07d3f82e7 Add a pfil(9) hook to get notified when interfaces detach.
When the ethernet interface of a pppoe pseudo-interface detaches, remove
the association and mark the pppoe interface down.
This should fix PR kern/28375.
2004-11-28 11:44:36 +00:00
itojun d2f1c029b9 kill sprintf, use snprintf 2004-04-21 18:40:37 +00:00
oki 1ced25841d fixed mbuf leak if up pppoe but not connected an ether i/f. 2004-03-30 06:00:13 +00:00
keihan 6979203302 s/netbsd.org/NetBSD.org/g 2003-11-28 08:56:48 +00:00
simonb a2facef339 Remove some assigned-to but otherwise unused variables. 2003-10-30 01:43:08 +00:00
christos 125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
wiz cff5e477ad Process has only one c. From miod@openbsd. 2003-09-26 22:23:58 +00:00
martin 392a465bb8 Tell copyinstr about the real buffer size (not one byte to few). Add more
error checking. Noticed by Quentin Garnier.
2003-09-16 20:59:04 +00:00
martin 965fbb9f63 If the peer cares to send us error messages, actually display them. 2003-09-03 21:36:31 +00:00
martin f5a54fd742 When trying to (re-)establish a session cope with intermediate output
failures of the underlying ethernet interface - just keep trying.
2003-08-23 16:42:41 +00:00
oki 955ac53d91 Put correct dest ether address on PPPoE server mode. 2003-06-27 16:24:32 +00:00
oki 6873b338d6 Add support in-kernel PPPoE server.
This may work with one PPPoE session.
If you want to use it, #define PPPOE_SERVER in somewhere,
or add options PPPOE_SERVER in kernel config file.

This is experimental code, and good start point for future development.
2003-06-18 08:12:51 +00:00
martin a3248903e4 Backout previous, I'm on crack obviously. 2003-03-01 15:50:15 +00:00
martin b15e7fee31 Initialize sc to NULL, it could be used uninitialized otherwise when
searching for our sc by host unique tag.
2003-03-01 15:24:36 +00:00
aymeric 038e238665 when looking up a Host-Uniq tag, do not consider NULL as a valid
(struct pppoe_softc *). Although we do not generate such tags, other hosts
could and some actually do.
2003-03-01 15:10:13 +00:00
martin fd690f8523 PADT is always send with ethertype PPPOE_DISCOVERY, no matter if we
have reached session state or not.

Fixes PR kern/20203 by Shoichi Miyake.
2003-02-04 20:52:23 +00:00
thorpej 882dec6ba3 Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.
2003-02-03 23:50:59 +00:00
martin 2e5336f7a8 Fix broken error handling in case M_PREPEND fails.
Noticed by Matthias Scheeler.
2003-01-07 20:02:10 +00:00
martin 501da0e586 In do not call pppoe_abort_connect if we fail to send the initial PADI
packet - there is nothing to abort.
In pppoe_abort_connect rearange state handling slightly to avoid calls
to the PPP LCP state machine get into an infinite recursion.

This should fix the symptoms of PR kern/19500, but does not touch the
real cause for the lossage described there.
2002-12-25 11:54:33 +00:00
martin adb5933cbb Apply patch from Todd Vierling in PR kern/17665:
remove a test that has been obsoleted by the authentication failure
counter - enter slow retry mode always, not only if we already transfered
data successfully (the test was designed to disable retries when the
initial authentication setting was not correct, the auth failure counter
does this job better).
2002-09-01 18:06:59 +00:00
martin ac83580ea9 Add an option PPPOE_TERM_UNKNOWN_SESSIONS to forcefully disconnect sessions
we don't know anything about with a PADT packet.

Use with care, this is pretty dangerous and will kill all userland PPPoE
implementations. Therefore it is not enabled by default nor added as
a commented out option to GENERIC kernels.

But it is highly usefull if you have a fixed IP, an ISP that does not use
LCP echo requests for link monitoring and you want to recover quickly after
a crash or otherwise ungracefull disconnect.
2002-09-01 17:21:40 +00:00
tron 56999645f0 Fix typo in a comment. 2002-08-25 19:21:47 +00:00
yamt a113bc6fa4 - free buf when unneeded.
- pass a consistent type to free(9).
2002-06-22 17:41:23 +00:00
yamt f6849cb26f fix loop condition.
(don't skip last tag)
2002-06-22 16:56:11 +00:00
itojun f16149934e avoid unneeded call to m_pullup 2002-06-22 11:46:16 +00:00
itojun 9f260b4865 do not require PPPoE control packet to be put into a single mbuf.
reviewed/tested by ymmt
2002-06-22 11:37:48 +00:00
itojun 32e2727406 more style 2002-06-22 05:59:27 +00:00
itojun 98171fbccc style 2002-06-22 05:54:14 +00:00
itojun a028d35cfd more KNF. warn about mbuf misuse (passing pointer outside of mbuf is dangerous) 2002-06-22 05:52:00 +00:00
itojun e94ae067d1 tabify. minor KNF 2002-06-22 05:33:42 +00:00
martin e4998611e9 Fix copyright notice. 2002-04-14 12:24:26 +00:00
martin b94047688f Avoid noise from the kernel if we have pseudo-device pppoe configured
but not used and a userland PPPoE pkg sends/receives PPPoE packets.
2002-03-04 15:15:05 +00:00
martin fe97d3f7c3 Clear M_BCAST and M_MCAST flags on mbufs before passing them down to the
ethernet driver - just in case it would look at them and do the wrong
thing.
2002-02-24 17:11:53 +00:00
martin e8aa4b2c2a Fix typo in comment. 2002-02-10 15:13:43 +00:00
martin 727264d2c9 Avoid any non-error output for normal operations, only print those
messages if the interface is set to debug.
2002-02-01 13:50:00 +00:00
martin 6446e841ec Tweak the slow-but-persistent connection reestablishment timeout, retrying
is not realy expensive - do it once every minute.

Prevent the MTU from being set bigger than what we can handle.
2002-02-01 13:40:16 +00:00