summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-26ipoe: introduced "ip-unnumbered" optionDmitry Kozlov
Before this time accel-ppp always worked in "ip unnumbered" mode. This option may turn this mode off (default is on)
2014-05-26ipoe: send NAK after number of unreplied REQUESTsDmitry Kozlov
After introduction offer-delay accel-ppp stopped to answer NAK for REQUESTs if requested session is not existing to give chance other servers to reply. But this causes that some broken clients enter to infinite REQUEST loop. This patch corrects this issue, so if offer-delay is not configured (means that this is only server in the net) or after receiving few REQUESTs accel-ppp send NAK for non-existing sessions.
2014-05-20ipoe: set initial session interface name to parent interface name (for ↵Dmitry Kozlov
logging purpose)
2014-05-20log_file: restore write message timestampsDmitry Kozlov
2014-05-20cmake: restore Debian6 specific install rulesDmitry Kozlov
2014-05-20Revert "cmake: restore Debian6 specific install rules"Dmitry Kozlov
This reverts commit c317ff519717c5c9f0513b85bb7d10ba084c74e9.
2014-05-20cmake: restore Debian6 specific install rulesDmitry Kozlov
2014-05-20triton: fix possible raceDmitry Kozlov
2014-05-20ipoe: add messages to know parent interface when creating vlan or virtual ↵Dmitry Kozlov
interface
2014-05-18triton: fix possible raceDmitry Kozlov
2014-05-18ipoe: use ifindex as connlimit key for non-shared interfacesDmitry Kozlov
2014-05-182-way interface renamingDmitry Kozlov
First try to rename interface immediately and if it fails then do second try later just before bring interface up. In case single-session=replace first try to rename interface may fail because first session may be active
2014-05-18Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/codeDmitry Kozlov
2014-05-18log_file: rewrited file write procedureDmitry Kozlov
Use separated thread to write messages to file instead of async io. On mips platform async io does not work properly by some reason and may stuck logging
2014-05-18log: append data to previous chunkDmitry Kozlov
Check if there is space in previous chunk and append log data there. This reduces memory usage and message fragmentation
2014-05-18improved single-session=replace handlingDmitry Kozlov
Wait for previous session completely terminated before continuing authorization new session.
2014-05-15triton: close file descriptors immediately in triton_unregister_handlerDmitry Kozlov
2014-05-13radius: introduced weight and backup per-server optionsDmitry Kozlov
New options are applied to server option as server=...[,weight=x][,backup] Weight is used for multi-server configurations (larger weight takes more users). Backup is used to mark backup server f.e. server which will be used only if all other servers are failed.
2014-05-12ippool: introduced shuffle optionDmitry Kozlov
By default list of IP address is serial at startup. This option shuffles initial IP list so it becomes more random.
2014-05-12radius: use NAS-Port-Id in Access-Accept for interface renamingDmitry Kozlov
2014-05-12radius: add support for Nas-Port-Id attribute (interface name)Dmitry Kozlov
2014-05-12pppoe: introduced called-sid option.Dmitry Kozlov
This new option will control how to represent Called-Station-ID. Its value maybe ifname,mac or ifname:mac. By default mac is used to keep compatibility with old versions. Also old option ifname-in-sid is removed from documentation, but is still supported for compatibility.
2014-05-12radius: close socket after receiving accounting replyDmitry Kozlov
2014-05-12radius: release auth request immediatly after get responceDmitry Kozlov
There is no need to keep auth request structure in memory during whole session life time. It wastes memory and file descriptors
2014-05-12triton: improved epoll events handlingDmitry Kozlov
2014-05-081.8.0 releaseDmitry Kozlov
* major l2tp rewrite * introduced ipoe (ipv4 only) module
2014-04-30net-snmp: add missing memdebug.h includeDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-30net-snmp: fiexed improper handling of empty username when requesting session ↵Dmitry Kozlov
table Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-29ipoe: limit only DHCPDISCOVER by connlimitDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-29ipoe: add support for connlimit moduleDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-29ipoe: implemented per-interface username optionDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-29net-snmp: unshare file descriptors namespaceGuillaume Nault
Use unshare(CLONE_FILES) to create a local file descriptors namespace for the SNMP thread. This is similar to what was done in bf5340 'net-snmp: run snmp in "special" thread', but without calling clone() directly. So the net-snmp plugin keeps running in a regular pthread. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-29Revert "net-snmp: run snmp in "special" thread"Guillaume Nault
This reverts commit bf5340291badcc631bd855bb924593cd445ecd26. snmp_thread() needs to be run as regular thread to allow Valgrind analysis. Using a different namespace for file desciptors will be done later on using unshare(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-24ppp: ipv6: check that ipv6 was not closed in NDDmitry Kozlov
2014-04-21Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/codeDmitry Kozlov
2014-04-21ipoe: rename __kfree_rcu to ipoe_kfree_rcu due to conflict with kernel's symbolDmitry Kozlov
2014-04-14Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/codeDmitry Kozlov
2014-04-14pppd compat: don't try to rename radattr files if RADIUS isn't usedGuillaume Nault
If accel-ppp is compiled with RADIUS support, but run without using it, then pd->tmp_fname is NULL. This patch verifies that pd->tmp_fname is valid before renaming the radattr file. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11ipoe: early allocate interface for shared vlans (prevents different values ↵Dmitry Kozlov
of NAS-Port in Access-Request and Account-Request) Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-11ipoe:lua: update thread-specific value when updating L (fixes segfault)Dmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-11net-snmp: run snmp in "special" threadDmitry Kozlov
NET-SNMP is built on top of stale file descriptor multiplexing mechanism (select) which prevents to use descriptors with number >= 1024. Due to accel-ppp uses a lots of descriptors NET-SNMP easy overflows this limit and fails and even may crash whole accel-ppp process. This patch runs snmp in special thread which does not share file descritor table with main process, so it can use less descriptors and live in __FD_SETSIZE limit. Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-11l2tp: don't disconnect immediately when receiving StopCCNGuillaume Nault
Wait for a full retransmission cycle after reception of a StopCCN. Introduce STATE_FIN_WAIT to identify tunnels which have received a StopCCN but are waiting for the disconnection timer to expire. A tunnel can go from STATE_FIN (i.e. StopCCN has been sent, waiting for acknowledgement) to STATE_FIN_WAIT (i.e. StopCCN has been received, waiting for full retransmission cycle), but not the other way around. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: improve configuration of retransmission optionsGuillaume Nault
* Set default retransmission timeout to 1 second. Since we now have exponential backoff, we can afford a smaller value. * Add the rtimeout-cap option to set the maximum value the retransmission timer has to respect during exponential backoff. * Store the maximun number of retransmissions in tunnel's structure (like other retransmission parameters). * Describe all these changes in man page and reset them to their default values if they're removed from configuration file before a reload. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: implement exponential backoff (retransmit)Guillaume Nault
Rework the l2tp_rtimeout() callback, so that time between retransmissions expands exponentially. This allows for faster retransmissions without without overwhelming the peer. A cap is set on the maximum retransmission time. For now it is set to 16 seconds. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: allow CDN reception with no Session IDGuillaume Nault
If a peer needs to disconnect a session for which it didn't receive any reply, it sends a CDN with no Session ID. In this case, the Assigned Session ID AVP is the only data that can be used to find out which session has to be closed. Though it isn't supported for now, let's accept and ack these messages. Session will be deleted on our side thanks to the establishment timer. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: configure receive window in accel-ppp.confGuillaume Nault
Add the recv-window option in accel-ppp.conf. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: implement local receive windowGuillaume Nault
Add a fixed length receive queue to tunnels and adverdise its length to the peer using the Receive Window Size AVP. Incoming message handling is modified as follow: -Read as much messages as possible and store them in the receive queue. Messages are stored in order, based on their sequence number. Messages not fitting into the queue are discarded (doesn't happen if peer respects our Receive Window AVP). This is the job of the new l2tp_tunnel_store_msg() function. It also automatically finds out if there are new messages to acknowledge. -Once all incoming messages have been read, free acknowledged packets from retransmission queue (based on the highest received acknowledgement number). -Then process messages in the receive queue. This is done by l2tp_tunnel_reply(). Each packet is processed by l2tp_{tunnel,session}_recv() (or dropped in some particular cases). The send queue is then pushed. If there's no message in the send queue and an acknowledgement is necessary, a ZLB is sent instead. -Finally, detect if the peer has acknowledged a StopCCN. There are three components to this test: -Have we tried to send a StopCCN? Check with tunnel's state. -Has the StopCCN been pushed on the network? Check with tunnel's send queue. -Has the peer acknowledged the StopCCN? Check with tunnel's retransmission queue. For now, l2tp_tunnel_store_msg() doesn't perform fast retransmissions. So l2tp_retransmit() is removed. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: rework error handling in l2tp_tunnel_allocGuillaume Nault
Use stacked error labels for better extensibility. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: don't initiate new sessions when sending window is fullGuillaume Nault
Refuse to create new sessions when the local send queue is bigger than the peer's receive window (i.e. when there are already more outstanding messages than what the peer can currently accept). Only sessions initiated locally are affected, session requests from the peer are still handled normally. This avoids adding useless presure on the sending window when many sessions are created locally. If sessions were created, they'd add many ICRQ or OCRQ messages in the send queue and we'd have to wait for all these messages to be sent before being able to reply to messages from the peer. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11l2tp: respect peer's receive windowGuillaume Nault
Store the Receive Window Size AVP sent by peer and respect it when sending messages. That is, stop sending messages from send queue once the number of unacknowledged messages is higher than peer's receive window. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>