Commit Graph

92 Commits

Author SHA1 Message Date
martin 7c66311782 Simplify auth failure reconnect a bit and make it more similar to the
session establishment timeout handling.
2008-08-19 22:03:05 +00:00
simonb e50c5ea246 Fix a tyop in a comment and a few #define<tab> nits while here. 2008-08-19 10:41:10 +00:00
martin e9e3618d99 When upper layer asks us to re-establish a connection, don't do so
synchronously, but insert a (varying) delay. Before we have only been
decoupled from the peer via network latency - now we introduce some
explicit delay. This, at least, creates batter serialized debug output.

However, if we have to reconnect because of an authentication failure,
the peer may have just been unable to access it's radius server. (I have
a setup where this seems to happen every now and then, depending on time
of day.) Backoff reconnect in this cases seriously longer - this is better
than hitting the max-auth-failure limit within a few seconds.
2008-08-18 21:43:49 +00:00
martin 11933dbf25 Test and handle memory allocation failure for the access concentrator
cookie.
2008-08-18 20:43:50 +00:00
martin 3c5d438020 Apply patch from Yasuoka Masahiko in PR kern/39321: fix length check
when parsing pppoe discovery phase packets.
2008-08-08 14:31:00 +00:00
christos bc168f2766 - add if_alloc (ours just mallocs), and if_initname and use them (from FreeBSD)
- kill memsets where M_ZERO can be used.
2008-06-15 16:37:21 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad 15e29e981b Merge the socket locking patch:
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
matt 2b028087f5 s/u_\(int[0-9]*_t\)/u\1/g
(change u_int*_t to uint*_t)
2008-02-20 17:05:52 +00:00
dyoung 2ccede0a9c Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs.  This will ease extending the kernel and sharing of code
between drivers.

First steps:  Make the signature of ifioctl_common() match struct
ifinet->if_ioctl.  Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
2008-02-07 01:21:52 +00:00
perry b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
ad 46ed8f7d77 Use the softint API. 2007-10-08 16:18:02 +00:00
martin 90ef42f1bb Print the access concentrator name when a session is established.
This seems to be usefull to identify peers with known broken firmware
(e.g. that can only do IPv4 reliably).
2007-09-09 09:58:55 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
martin de3603e82a caddr_t fallout (only visible with options PPPOE_SERVER) 2007-03-31 11:00:23 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
martin 567f8e3fe9 Do not truncate the last char from a remote error message 2006-11-01 12:10:06 +00:00
elad 0a57b5966b Kill some KAUTH_GENERIC_ISSUSER uses. 2006-10-25 20:28:45 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 3ed5fa0441 Fix initializers. 2006-08-30 16:57:59 +00:00
pavel 8bf13164fe defflag PPPOE_SERVER and PPPOE_TERM_UNKNOWN_SESSIONS. 2006-08-05 17:20:54 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
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