summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-07radius: update Session-Timeout by CoADmitry Kozlov
2016-06-02radius: initialise ipv6db addresses completelyGuillaume Nault
The 'installed' bit of the allocated ipv6db_addr_t structure needs to be initialised. This is because ap_session_ifdown() reads this bit to know if the address or route needs to be removed from the kernel. The 'installed' bit is set by ap_session_accounting_started() and the ND and DHCPV6 protocol handlers, but disconnection could happen before these steps. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-06-02ppp: remove obsolete filesGuillaume Nault
This files aren't used (and aren't even compiled) anymore. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-06-02ppp: make include/ppp_auth.h a symlinkGuillaume Nault
include/ppp_auth.h used to be a symlink to ppp/ppp_auth.h, until it was made a copy by ebbd6f580322 ("fix typo (successed -> succeeded)"). Therefore, changes to ppp/ppp_auth.h aren't visible to files including ppp_auth.h anymore. These files have already diverged (just a whitespace fix for now), so let's restore the original symlink before more changes occur. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-06-02set INSTALL_RPATH for ipoe and pppoeDmitry Kozlov
2016-05-31accel-ppp Debian x32 fix minor -Wformat warningsMarek Michalkiewicz
Hello, small patch to avoid gcc -Wformat warnings on Debian x32 where time_t is "long long" (64-bit signed, to be 2038 safe), not "unsigned long" (32-bit unsigned) corresponding to "%lu" format strings. Regards, Marek
2016-05-31Fixup - don't divide on unchecked values. Multiply instead.Mihail Vasilev
2016-05-14lcp: fix Protocol-Field-Compression settingGuillaume Nault
The kernel flag used for setting PFC is SC_COMP_PROT (SC_COMP_AC is for Address-and-Control-Field-Compression). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11iprange: warn before disabling module due to /0 network with non-null IPGuillaume Nault
Using a /0 prefix on an IP different from 0.0.0.0 is valid, but might be a configuration mistake. Log warning message in this case so that user can easily troubleshoot it. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11iprange: replace UINT32_MAX by INADDR_BROADCASTGuillaume Nault
This is equivalent, but INADDR_BROADCAST is more descriptive. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11iprange: don't warn about empty iprange config if no modules depend on itGuillaume Nault
Move warning messages to PPTP and L2TP modules. No other module actually uses iprange, so it's perfectly valid to disable it, or at least to not configure any range, when PPTP and L2TP aren't used. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11iprange: implement config reloadGuillaume Nault
Protect conf_disable and client_ranges with a mutex. Instead of directly setting conf_disable, load_ranges() now returns a disable flag. The caller is in charge of propagating its value in conf_disable. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11triton: implement list_replace*()Guillaume Nault
Add list_replace() and list_replace_init(), as defined in Linux kernel sources. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-11iprange: rework ip range parsing functionsGuillaume Nault
The previous parsing functions had a few problems: * They did accept negative numbers in addresses (e.g. 192.0.2.-5). * They relied on C undefined behaviour for detecting /0 prefix length: "mask = htonl(~((1 << (32 - m)) - 1)" was wrong for m = 0, because that resulted in a left shift of 32 bits, on a 32 bit wide value (the right operand of a bitwise shift operator must be strictly smaller than the width of the promoted left operand). * They misinterpreted /32 prefixes as disable requests. In fact, due to the undefined behaviour described above, /0 and /32 prefix lengths were represented in the same way by parse1(), that is, with an iprange_t structure where ->begin == ->end. Therefore load_ranges() had no way to distinguish between them and did disable the module in both cases. This patch fixes these issues and brings the following improvements: * It uses getaddrinfo() to parse IP addresses, so it accept (almost) all IPv4 representations and is more easily extensible to IPv6 in the future. * It warns when the IP address used in CIDR notation is not the first address in the range (e.g. the first address of 192.0.2.1/24 is 192.0.2.0, not 192.0.2.1). * It doesn't _exit() on parsing failures, thus making the functions usable in an EV_CONFIG_RELOAD handler. While there, the unfinished tunnel_ranges code, which was already commented, has been removed. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-05-02fixed typo in the previous commitDmitry Kozlov
2016-04-30more verbose interface rename error messageDmitry Kozlov
2016-04-30radius: add Delegated-IPv6-Prefix to accounting packetsDmitry Kozlov
2016-04-30Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/codeDmitry Kozlov
2016-04-28cli: flush pending data before disconnectingGuillaume Nault
The telnet and tcp servers disconnect as soon as they receive the 'exit' command or see a disconnection from the client. In this case, all data queued for transmission are lost. This can lead to truncated output when big amount of data is being sent. For example, on a moderately loaded server with a few thouthands connections, the output of the 'accel-cmd show sessions' command can be truncated. The problem is that accel-cmd sends the 'show sessions' command, followed by 'exit'. It does so because it has to stop running once all data has been received from the server. But it never knows whether more data are going to arrive. Disconnection must then come from the server, hence the use of 'exit' (although the same effect could be achieved with shutdown(SHUT_WR)). The telnet and tcp modules behave very similarly and are modified in the same way: * For a soft disconnection, cln_read() doesn't call disconnect() anymore if there are data queued for transmission. Instead it sets the 'disconnect' flag and stops listening to its peer (no need to process further messages). * cln_write() checks the 'disconnect' flag once it has sent all pending data and actually performs the disconnection if necessary. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-04-28cli: fix data output miss-orderingGuillaume Nault
In tcp and telnet backends, the first buffer been queued is directly pointed to by cln->xmit_buf. It's not added to cln->xmit_queue. Therefore testing if ->xmit_queue is empty doesn't reliably tells if data has already been queued. We should test if ->xmit_buf is non-NULL instead. This is reliable because ->xmit_buf is re-filled with the first buffer from ->xmit_queue after every successful write(). Failure to properly check if data has already been queued can lead to message miss-ordering because cli_client_send() or telnet_send() will try to directly write() their input buffer, effectively bypassing the one previously queued up in ->xmit_buf. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-04-28cli: fix partial line duplication and truncationGuillaume Nault
When queueing output data for later write(), the 'n' first bytes of the buffer have already been sent (we have n > 0 if EAGAIN was returned after some other write() calls succeeded). Therefore, we need to skip these bytes when initialising the buffer to be queued. The size passed to memcpy() did already take that space into account. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2016-04-17preparation for DPDK intergation (part 7)Dmitry Kozlov
2016-04-15preparation for DPDK intergation (part 6)Dmitry Kozlov
2016-04-13logwtmp: check for username presenceDmitry Kozlov
2016-04-13ppp: removed mtu/mru size warningsDmitry Kozlov
2016-04-13ppp: increase input buffer sizeDmitry Kozlov
2016-04-12ipoe: generate EUI-64 interface identifier for ipv6 addressesDmitry Kozlov
2016-04-12ipv6: remove ipv6 address and routes on session terminationDmitry Kozlov
2016-04-11Revert "pppoe: do not negotiate LCP MRU option if it is larger than 1492"Dmitry Kozlov
This reverts commit fc098b3062badfd802f91241533069cad4886b6f.
2016-04-10Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/codeDmitry Kozlov
2016-04-10pppoe: do not negotiate LCP MRU option if it is larger than 1492Dmitry Kozlov
2016-04-07link pppoe and ipoe with vlan-mon libraryDmitry Kozlov
2016-04-06radius: do not mark request as active if send function failsDmitry Kozlov
2016-04-05ipoe: continue to reply to dhcp requests on active sessions when "shutdown ↵Dmitry Kozlov
soft" is active
2016-04-05improved logging: if session's interface is empty log ctrl's interfaceDmitry Kozlov
2016-04-05pppoe: add interface name to log messagesDmitry Kozlov
2016-04-05ipoe_mod: code simplificationDmitry Kozlov
2016-04-05iputils: check for IFLA_INFO_KIND presenceDmitry Kozlov
2016-04-04ipoe_mod: restored ip-mac binding functionDmitry Kozlov
2016-04-04Revert "vlan_mon: recalculate busy mask on vlan mask update"Dmitry Kozlov
This reverts commit f67292499b20f599f2bd744d2dcf0f6779581787.
2016-04-04ipoe: remove stale backup.cDmitry Kozlov
2016-04-04pppoe: stop "vlan timeout" timer on new connectionDmitry Kozlov
2016-04-04vlan_mon: fixed panic on latest kernelsDmitry Kozlov
2016-04-04vlan_mon: fixed bugDmitry Kozlov
2016-04-04vlan_mon: make possible to work other module after message "vlan not started"Dmitry Kozlov
2016-04-04vlan_mon: recalculate busy mask on vlan mask updateDmitry Kozlov
2016-04-04vlan_mon: fixes for previous commitDmitry Kozlov
2016-04-04vlan_mon: introduced autoclean module parameterDmitry Kozlov
if autoclean=1 then vlan_mon will delete all vlan interfaces created by previous accel-pppd run f.e. vlan_mon cleans created interfaces if accel-pppd restarts
2016-04-04ipoe,pppoe,vlan_mon: deleted conditions to simultaneous start ipoe and pppoe ↵Dmitry Kozlov
on same interfaces (started by vlan_mon)
2016-04-04pppoe: add support for PPP-Max-Payload tag (RFC 4638)Dmitry Kozlov