summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/ipoe.c
AgeCommit message (Collapse)Author
2021-09-08ipoe: check for local-net in arp requestsDmitry Kozlov
2021-08-26fixed race condition when manipulating serv->timerDmitry Kozlov
2021-03-23ipoe: recover common check-ip opt processingVladislav Grishenko
2021-03-20ipoe: fix NULL checkVladislav Grishenko
2021-03-13Fix some errors and warnings found by cppcheck[anp/hsw]
[accel-pppd/ctrl/ipoe/ipoe.c:4054]: (style) A pointer can not be negative so it is either pointless or an error to check if it is not. [accel-pppd/logs/log_syslog.c:148]: (error) Array 'facility_name[9]' accessed at index 35, which is out of bounds. [accel-pppd/lua/session.c:274]: (error) Common realloc mistake: 'mods' nulled but not freed upon failure [accel-pppd/extra/ippool.c:114]: (warning) %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:114]: (warning) %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:114]: (warning) %u in format string (no. 3) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:114]: (warning) %u in format string (no. 4) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:114]: (warning) %u in format string (no. 5) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:141]: (warning) %u in format string (no. 1) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:141]: (warning) %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:141]: (warning) %u in format string (no. 3) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:141]: (warning) %u in format string (no. 4) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/extra/ippool.c:141]: (warning) %u in format string (no. 5) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/main.c:97]: (warning) %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [accel-pppd/radius/radius.c:687] -> [accel-pppd/radius/radius.c:690]: (warning) Possible null pointer dereference: rpd - otherwise it is redundant to check it against null. [accel-pppd/radius/serv.c:805] -> [accel-pppd/radius/serv.c:829]: (warning) Possible null pointer dereference: ptr2 - otherwise it is redundant to check it against null. [accel-pppd/radius/serv.c:813] -> [accel-pppd/radius/serv.c:829]: (warning) Possible null pointer dereference: ptr2 - otherwise it is redundant to check it against null. [accel-pppd/radius/serv.c:823] -> [accel-pppd/radius/serv.c:829]: (warning) Possible null pointer dereference: ptr2 - otherwise it is redundant to check it against null.
2020-12-19ipoe: added option 56 to DHCP NAK packetDmitry Kozlov
2020-06-08ipoe: gracefuly terminate denied sessionsVladislav Grishenko
2020-04-30ipoe: dhcp: add rebind-time supportVladislav Grishenko
2020-03-07session: add global [common]max-starting optionVladislav Grishenko
usually there's no need to have per-proto limitation, since the need of max starting limitation affects the whole server, not particular protocol only.
2020-03-07Revert "ipoe,pptp: introduced max-starting option (limit number of starting ↵Vladislav Grishenko
sessions)" This reverts commit 02008c74a19c538ff7d9ce643c8cd4c738886196.
2020-01-11ipv6pool: add per-proto ipv6-pool and ipv6-pool-delegate optionsVladislav Grishenko
also, disable ipv6 pools via chap-secrets, need to find another syntax for it, may be with comments.
2019-09-11ipoe: check for ipoe_create_session_dhcpv4 returns not NULLDmitry Kozlov
2019-09-04ipoe,pptp: introduced max-starting option (limit number of starting sessions)Gavrilenkov A
2019-08-29ppp/ipoe: cleanup cleck-ip supportVladislav Grishenko
let check-ip setting from [ppp]/[ipoe] sections has prio over [common] for compatibility with older configs.
2019-08-20Prepared check-ip and for ipoe, migrate to [common]check-ipDmitriyEshenko
2019-05-13ipoe: restored max-lease-time functionalityDmitry Kozlov
2019-05-13Revert "ipoe: restored max-lease-time functionality"Dmitry Kozlov
This reverts commit 6f433706a152ea987899fd830ff399e257b0f2a6.
2019-05-13Merge branch 'master' of github.com:xebd/accel-pppDmitry Kozlov
2019-05-13ipoe: restored max-lease-time functionalityDmitry Kozlov
2019-05-09ipoe: Fix send NAK for REQUEST with 3 same XID for not existing sessionsDmitriyEshenko
2019-01-27ipoe: fix start=up not work if set not per-interfaceDmitriyEshenko
2019-01-23ipoe: log invalid start values and fix dist configVladislav Grishenko
2019-01-19ipoe/cli: fix build warningsVladislav Grishenko
2018-12-20ipoe: stricter route deletionGuillaume Nault
Rework the conditionals to make __ipoe_session_activate() and ipoe_session_finished() follow the same logic: * Drop the second '!serv->opt_ifcfg' test in __ipoe_session_activate(), which is is already checked by the parent conditional. * Invert the order of the tests in ipoe_session_finished(), so that it uses the same conditions as __ipoe_session_activate(). Finally, set the 'src' parameter in iproute_del(), so that we can be sure that the deleted route matches the one added by __ipoe_session_activate(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2018-12-20iputils: add 'src' and 'gw' parameters to iproute_del()Guillaume Nault
Rework iproute_del() to have the same parameters as iproute_add(). This will allow callers to specify more precisely the route they want to delete. Callers will later be converted to make use of these parameters to ensure that the removed route precisely matches the one that was originaly inserted. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2018-06-08ipoe: use vendor option for attr_dhcp_opt82_xxx tooDmitry Kozlov
2018-05-31ipoe: use lua function to generate username for UP sessions tooDmitry Kozlov
2018-05-28ipoe: do not bring interface down on session termination in shared=0 modeDmitry Kozlov
2018-05-25ipoe: introduced ip-unnumbered per-interface optionDmitry Kozlov
2018-05-25ipoe: do not remove address on session finish if ifcfg=1Dmitry Kozlov
2018-05-25ipoe: small fix for previous commitDmitry Kozlov
2018-05-25ipoe: improved mac change detectionDmitry Kozlov
2018-05-25ipoe: do not wait packet from ipoe kernel module in "shared=0,start=up" modeDmitry Kozlov
ipoe: pass mask to ifcfg in ip unnumbered mode
2018-04-03ipoe: assign default values to verbose and unit-cache if not specified on ↵Dmitry Kozlov
config reload
2018-02-21radius: add support for route priority (metric) in Framed-RouteGuillaume Nault
Let an optional route priority (aka metric) be defined in RADIUS Framed-Route attributes. The priority is an integer placed at the end of the route string. This is backward compatible with the previous format and also conforms with the recommended format defined by RFC 2865 (although we don't allow multiple metrics). Framed-Route format is: <network> [<gateway> [<priority>]] For example, 'Framed-Route = "192.0.2.0/24 203.0.113.1 8"' will let the following route be installed (assuming 203.0.113.1 is routed through eth0): $ ip route show [...] 192.0.2.0/24 via 203.0.113.1 dev eth0 metric 8 It's possible to use the unspecified gateway (0.0.0.0) if one wants to set a priority without specifying a gateway address. Finally, route deletion now also takes the priority into account, in order to avoid removing a different route accidentally. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2018-01-25ipoe: use DHCP-Server-Identifier attribute as siaddr if ↵Dmitry Kozlov
DHCP-Server-IP-Address is not supplied
2018-01-25ipoe: improved handling of DHCP Request for nonexistent sessionsDmitry Kozlov
Send NAK only to unicast requests or if requested Server-ID matches one of gw-ip-address
2018-01-22ipoe: ipv6: generate intf_id only if not set by upper layerDmitry Kozlov
2018-01-09ipoe: do not create ipoe interface with server's ifindexDmitry Kozlov
2018-01-05ipoe: implemented ipv6 in shared modeDmitry Kozlov
2017-12-28ipoe: check noauth option in [auth] section tooDmitry Kozlov
2017-12-27ipoe: include server's mac into weight notify packet to be used as ↵Dmitry Kozlov
additional key when weights are equal
2017-12-27ipoe: implemented new load balancing mechanismDmitry Kozlov
new config options: [ipoe] weight=N - global weight interface=ethX,weight=N - per-interface weight How it works: On reception of DHCPDISCOVER accel-ppp sends broadcast DHCP message to port 67 with same xid and add special vendor-specific option where encodes its current session count multipled by weight. On reception of such message accel-ppp searches session with same xid and compares weight. If received weight is less than session's weight then it terminates this session. per-interface weight=0 has special meaning as backup (fail-over) interface, f.e. it terminates session on any received weight. By default weight based load balancing is disabled. To enable need to specify global or/and per-interface weight.
2017-12-19ipoe: fixed memory leakDmitry Kozlov
2017-12-05ipoe: fixed mutex deadlockDmitry Kozlov
2017-12-01ipoe: check connlimit for UP sessionsDmitry Kozlov
2017-11-29ipoe: fixed handling DHCP vendor-specific attributesDmitry Kozlov
2017-10-25ipoe: fixed bugDmitry Kozlov
Assign opt82_ses=ses if shared=0
2017-09-25ipoe: introduced interface option mtu=NDmitry Kozlov
2017-08-08ipoe: add client ip (second ip) as route when nat=1 (make quagga happy)Dmitry Kozlov