summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_pppoe.c
Commit message (Collapse)AuthorAgeFilesLines
* Dej'a vu of revision 1.35glebius2005-09-191-1/+1
| | | | | PR: kern/86258 Submitted by: Hiroshi Oota <ghelp excite.co.jp>
* Remove obsoleted sysctl interface for switching between standard and 3Comglebius2005-07-051-39/+1
| | | | | | | | | | PPPoE modes. The interface was declared obsoleted before 5.3-RELEASE. When running as access concentrator ng_pppoe(4) supports both modes simultanously. When running as client mode can be swicthed in ppp(8) configuration. Approved by: re (scottl)
* Remove ng_connect_t where it is unused. Probably it remained from ng_source.c.glebius2005-03-141-13/+0
|
* Drop mythical module dependency on ng_ether.ru2005-02-131-2/+0
|
* /* -> /*- for license, minor formatting changesimp2005-01-071-2/+3
|
* - Use ng_callout() instead of timeout()glebius2004-12-081-30/+23
| | | | | | | - remove spl(9) calls Tested by: Ilya Pizik Approved by: julian (mentor)
* Since last change moved ';' from macro to code, we need to embraceglebius2004-10-311-2/+2
| | | | | | | | macros with 'do {} while (0)' to avoid error in case macro is not defined. Prodded by: julian, archie Pointy hat to: glebius
* Rename debug macro to DBG and indent it properly.glebius2004-10-281-23/+21
| | | | | Requested by: maxim Approved by: julian (mentor)
* Another stupid error from my side. PPPOE_NONSTANDARD was first definedglebius2004-08-011-9/+9
| | | | | | | | in enum {}, and then redefined with #define. No warnings from compiler, though. Submitted by: bz Pointy hat to: glebius
* When node is server serve both standard RFC2516 and non-standard 3Comglebius2004-07-271-42/+111
| | | | | | | | | | clients simultaneously. When node is client its mode is configured with a control message. sysctl net.graph.nonstandard_pppoe is deprecated but kept for backward compatibility for some time. Approved by: julian
* Add a note indicating that the eh_prototype field used to constructrwatson2004-07-141-0/+4
| | | | ethernet headers is unsynchronized.
* Having moved metadata usage to mbuf tags, remove code that supportsjulian2004-06-261-2/+2
| | | | | | the old way of doing it. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
* Switch to using C99 sparse initialisers for the type methods array.julian2004-05-291-12/+10
| | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
* Get rid of the deprecated *LEN constants in favour of the newharti2004-01-261-2/+2
| | | | *SIZ constants that include the trailing \0 byte.
* The default value of net.graph.nonstandard_pppoe is changed to -1,yar2003-12-191-2/+2
| | | | | | | | | | | | | | | | which means "always stay in the standard mode of PPPoE operation regardless of any junk floating around." As the referenced PR stated clearly, the old default setting of 0 was extremely dangerous because it opened a possibility for a spurious frame not only to put down a single PPPoE node running FreeBSD, but to plague *every* FreeBSD node in a PPPoE network in such a way that those nodes would keep poisoning each other until rebooted simultaneously. PR: kern/47920 Reviewed by: Gleb Smirnoff <glebius <at> cell.sick.ru> MFC after: 1 week
* Fixed compilation on 64-bit platforms.ru2003-12-191-2/+2
|
* There are two modes of ng_pppoe operation, standard andyar2003-12-181-11/+38
| | | | | | | | | | | | | | | | | | | nonstandard. They differ in the values of certain fields in the PPPoE frame. Previously, ng_pppoe would start in standard mode, yet switch to nonstandard one upon reception of a single nonstandard frame. After having done so, ng_pppoe would be unable to interact with standard PPPoE peers. Thus, a DoS condition existed that could be triggered by a buggy peer or malicious party. Since few people have expressed their displeasure WRT this problem, the default operation of ng_pppoe is left untouched for now. However, a new value for the sysctl net.graph.nonstandard_pppoe is introduced, -1, which will force ng_pppoe stay in standard mode regardless of any bogus frames floating around. PR: kern/47920 Submitted by: Gleb Smirnoff <glebius <at> cell.sick.ru> MFC after: 1 week
* Back out M_* changes, per decision of the TRB.imp2003-02-191-9/+9
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-9/+9
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Use %z to print a size_t value.jhb2002-11-081-1/+1
|
* use __packed.alfred2002-09-231-2/+2
|
* Don't use "NULL" when "0" is really meant.archie2002-08-221-3/+3
|
* NUL terminate the ACNAME passed to userland.brian2002-06-221-3/+4
|
* Const'ify variables to make it clear we're not writing to the mbuf data.archie2002-06-051-31/+33
| | | | | Reviewed by: julian, brian MFC after: 1 week
* Fix GCC warnings caused by initializing a zero length array. In the process,archie2002-05-311-4/+4
| | | | | | | simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks
* Add a NGM_PPPOE_SESSIONID message to the ng_pppoe node.brian2002-05-141-0/+19
| | | | | | | This message is sent to the control socket when the SessionID is established. Approved by: archie (after a very cursory glance)
* Send a NGM_PPPOE_ACNAME message to userland when a node is connected.brian2002-02-201-1/+23
| | | | | | Submitted by: Andre Albsmeier <andre@albsmeier.net> Shuffled about by: brian Approved by: julian
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-1/+1
| | | | also don't use ANSI string concatenation.
* MFS: change name of sysctl to something more diplomatic.julian2001-09-041-9/+9
|
* Pack struct uniqtag declarations to stop our data field from being pushedbrian2001-08-021-2/+2
| | | | | | | 4 bytes to the right on the alpha. Tested by: Thomas Pornin <Thomas.Pornin@ens.fr> MFC after: 1 week
* If an attempt is made to LISTEN for a service tag that's already beingbrian2001-07-251-14/+28
| | | | | | | | | | | | | LISTENed for, return EEXISTS. Only match the magic "*" service tag if no other LISTEN service tags match. Require an explicit LISTEN for an empty service tag in order to match empty service requests. Approved by: julian MFC after: 3 days
* Shuffle sysctls a bit (thankyou whoever made them dynamic for modules)julian2001-02-231-5/+46
| | | | | | | | | | | | and add a sysctl to pppoe to activate non standard ethertypes so that idiot ISPs (apparently in France) who use equipment from idiot suppliers (rumour says 3com) who use nonstandard ethertypes can still connect. "yep, sure we do pppoe, we use a different identifier to that dictated in the standard, but sure it's pppoe!" sysctl -w net.graph.stupid_isp=1 enables the changeover.
* Implement direct support for semipersistant nodes.julian2001-01-301-0/+2
| | | | | | | | | | | | | (e.g. ethernet nodes are persistent until you rip out the hardware) Use this support in the ethernet and sample nodes. Add some more abstraction on the 'item's so that node and hook reference counting can be checked easier. Slight man page correction. Make pppoe type dependent on ethernet type. Clean up node shutdown a little. Move a mutex from MTX_SPIN to MTX_DEF (oops) Fix small ref-counting bug. remove warning on one2many type.
* Add an exported function ng_rmhook_self() that removes a hookjulian2001-01-111-2/+2
| | | | | | | | from a node, but does it via the locking queue, thus ensuring that the node is locked when it's hook is removed. Add 'deadnode' and 'deadhook' structures for when a node or hook is invalidated but not yet freed. (not yet freed)
* Fix uninitialised pointer.julian2001-01-111-0/+1
| | | | Found by: Brian Sommers
* Only free items that are not already free or passed to other nodes.julian2001-01-101-1/+2
| | | | Clever work by: Brian Sommers (Brian@freeBSD.org)
* Fix some memory leaksjulian2001-01-101-10/+16
| | | | Add memory leak detection assitance.
* Part 2 of the netgraph rewrite.julian2001-01-081-63/+62
| | | | | | This is mostly cosmetic changes, (though I caught a bug or two while makeing them) Reviewed by: archie@freebsd.org
* Rewrite of netgraph to start getting ready for SMP.julian2001-01-061-55/+57
| | | | | | | | This version is functional and is aproaching solid.. notice I said APROACHING. There are many node types I cannot test I have tested: echo hole ppp socket vjc iface tee bpf async tty The rest compile and "Look" right. More changes to follow. DEBUGGING is enabled in this code to help if people have problems.
* Divorce the kernel binary ABI version number from the messagejulian2000-12-181-1/+1
| | | | | | | | | format version number. (userland programs should not need to be recompiled when the netgraph kernel internal ABI is changed. Also fix modules that don;t handle the fact that a caller may not supply a return message pointer. (benign at the moment because the calling code checks, but that will change)
* Impossible to see typo.. |= instead of !=julian2000-12-181-1/+1
|
* Reviewed by: Archie@freebsd.orgjulian2000-12-121-9/+51
| | | | | | | | | | | | | This clears out my outstanding netgraph changes. There is a netgraph change of design in the offing and this is to some extent a superset of soem of the new functionality and some of the old functionality that may be removed. This code works as before, but allows some new features that I want to work with and evaluate. It is the basis for a version of netgraph with integral locking for SMP use. This is running on my test machine with no new problems :-)
* Add the use of M_ZERO to netgraph.dwmalone2000-11-181-6/+5
| | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie
* Go back to using data_len in struct ngpppoe_init_data after discussionsbrian2000-11-161-59/+34
| | | | | | | | | | | with Julian and Archie. Implement a new ``sizedstring'' parse type for dealing with field pairs consisting of a uint16_t followed by a data field of that size, and use this to deal with the data_len and data fields. Written by: Archie with some input by me Agreed in principle by: julian
* Swap the order of two tags in the pppoe PADI and PADS packetsjulian2000-10-311-3/+3
| | | | | as there are apparently some buggy switches that need them in that order. (I hope there aren't any that require them in the old order!)
* Change the format of ngpppoe_init_data so that the provider is NULbrian2000-10-311-27/+120
| | | | | | | | | | | terminated and the data_len field is no longer necessary. Add ASCII2BINARY and BINARY2ASCII capabilities. The old format is still understood and dealt with, but can't do the ASCII2BINARY and BINARY2ASCII stuff. Approved by: archie
* Since neither archie nor I work at Whistle any more, change our emailjulian2000-10-241-1/+1
| | | | | | addresses to be the more usefu @freebsd.org ones so we can keep getting bug-reports. - man pages to follow..
* Allocate all memory (including within node constructors) with M_NOWAITarchie2000-09-211-3/+3
| | | | instead of M_WAITOK, to allow for maximum flexibility.
* Rename "struct session" to "struct sess_con" to avoid conflict witharchie2000-09-191-4/+4
| | | | | | upcoming "struct session" in proc.h. Requested by: jasone
* RFC 1661 requires that all LCP packets are sent with no address andarchie2000-08-101-0/+14
| | | | | | | | | | control field compression. The ng_ppp(4) node correctly follows this rule. However, PPPoE is an exception: when doing PPPoE *all* frames are sent with address and control field compression. Alter this node's behavior so that when an outgoing frame is received, any leading address and control field bytes are removed. This makes this node compatible with ng_ppp(4).
OpenPOWER on IntegriCloud