summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-21Merge pull request #31 from svlobanov/T55-netlink-socket-sizexebd
T55: add netlink buffer size configuration parameters
2021-12-21Merge pull request #32 from DmitriyEshenko/master-21122021-01xebd
T57: use readlink exe_buf to determine correct program name after res…
2021-12-21T57: use readlink exe_buf to determine correct program name after restartDmitriyEshenko
2021-12-20T55: add netlink buffer size configuration parametersSergey V. Lobanov
Netlink buffers may overflow so it might be useful to increase send and receive netlink buffer sizes. Two parameters to [common] configuration section added: nl-rcv-buffer, nl-snd-buffer. It is required to set (sysctl) net.core.wmem_max>=nl-snd-buffer and net.core.rmem_max>=nl-rcv-buffer before running accel-pppd To check current netlink buffer size and related info use the following command: % ss -f netlink -m 0 0 rtnl:kernel * skmem:(r0,rb212992,t0,tb212992,f0,w0,o0,bl0,d0) 0 0 rtnl:-1140221812 * skmem:(r0,rb2048000,t0,tb80000,f0,w0,o0,bl0,d0) 0 0 rtnl:accel-pppd/14285 * skmem:(r0,rb2048000,t0,tb65536,f0,w0,o0,bl0,d0) ... (Please check man ss to get the meaning for r,rb,t,tb,f,w,o,bl and d params) In the ss output you will see the values doubled from configured. First accel-pppd netlink socket will use default values (rcv=1048576, snd=32768) regardless of configured nl-rcv-buffer and nl-snd-buffer values. Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2021-12-20Merge pull request #30 from DmitriyEshenko/m-17122021xebd
T54: Use get_stats function to prevent garbage in counters
2021-12-17T54: Use get_stats function to prevent garbage in countersDmitriyEshenko
2021-12-17Merge pull request #29 from DmitriyEshenko/master-10122021xebd
vrf: T10: Add VRF support
2021-12-16vrf: T10: Add VRF supportDmitriyEshenko
Co-authored-by: Sergey V. Lobanov <svlobanov@users.noreply.github.com> Co-authored-by: Vladislav Grishenko <themiron@users.noreply.github.com>
2021-12-10Merge pull request #28 from DmitriyEshenko/master-10122021-01Eshenko Dmitriy
T53: Restart servece if accel-ppp return non-zero exit code
2021-12-10T53: Restart servece if accel-ppp return non-zero exit codeDmitriyEshenko
2021-10-21Merge pull request #24 from svlobanov/T50-arp-smacxebd
T50: use server mac in arp replies for proxy_arp=2
2021-10-20T50: use server mac in arp replies for proxy_arp=2Sergey V. Lobanov
proxy_arp=2 should be used for ipoe setup with shared vlan and intra-vlan l2 isolation. accel-ppp should use server mac when sending arp reply message. There is no reason to send subscriber's mac if proxy_arp is enabled In case of ipoe shared vlan without l2-isolation, proxy_arp=1 should be used
2021-10-05Merge pull request #23 from soup000/masterxebd
Fixed typos in cli help.
2021-10-05Fixed typos in cli help.soup
2021-09-24Merge branch 'master' of github.com:accel-ppp/accel-pppDmitry Kozlov
2021-09-24triton: do not queue context in init stateDmitry Kozlov
2021-09-20Merge pull request #22 from DmitriyEshenko/masterVladislav Grishenko
Fix logging per-user-dir. Add possibility to drop session hard if it already has finish state
2021-09-08ipoe: check for local-net in arp requestsDmitry Kozlov
2021-09-04T46: Fix per-user-dir loggingDmitriyEshenko
2021-09-04Terminate session by the second PoD when soft-terminate=1 configuredDmitriyEshenko
2021-08-26Merge branch 'master' of github.com:accel-ppp/accel-pppDmitry Kozlov
2021-08-26fixed race condition when manipulating serv->timerDmitry Kozlov
2021-07-09ipoe: dhcpv4: fix address lost due signed overflowVladislav Grishenko
fixes a1a2b79240511222868a60960d51f12adbe0d7d4
2021-07-01T43: Change to list_for_each_safe to prevent segmentation faultDmitriyEshenko
2021-06-30T42: Add Debian 11 cpack requirements (#19)Eshenko Dmitriy
2021-06-16Merge pull request #18 from DmitriyEshenko/16062021-fix-addr-rangexebd
ipoe: T41: Fix address range shifting
2021-06-16ipoe: T41: Fix address range shiftingDmitriyEshenko
2021-05-25cli: fix absent OK status for 'show version'Vladislav Grishenko
fix 4b52c1a3590b43ca892c460d9b1478e1da742156
2021-05-25Merge branch 'master' of github.com:accel-ppp/accel-pppVladislav Grishenko
2021-05-25shaper: fix fq_codel noecn regressionVladislav Grishenko
2021-05-25shaper: fix 09f73dab273989c6f36efe548c4b5e83d83b5416 regressionVladislav Grishenko
closes #17
2021-05-24Merge pull request #15 from Joes-Madness/cli_show_versionxebd
cli: T40: Show version of running accel-pppd from cli or telnet
2021-05-24Merge pull request #14 from DmitriyEshenko/accept-blank-servicexebd
Add accept-blank-service option
2021-04-30Merge branch 'master' of github.com:accel-ppp/accel-pppDmitry Kozlov
2021-04-30ipoe: use destination address from IP header as server_id if not sent in ↵Dmitry Kozlov
dhcp request header
2021-04-27Add 'show version' command in CLIroot
2021-04-23Add accept-blank-service optionDmitriyEshenko
2021-04-08ippool, ipv6pool: fix iterating over circular poolsVladislav Grishenko
2021-04-07ippool: fix next pool handlingVladislav Grishenko
* fix no next pool when it was defined after referencing: 192.168.1.2-255,name=pool1,next=pool2 192.168.2.2-255,name=pool2 * fix UB when next pool was set to same pool: 192.168.1.2-255,name=pool1,next=pool1 * add warning about empty/not defined next pools
2021-04-07ipv6pool: fix next pool handlingVladislav Grishenko
* fix no next pool when subsequent pool prefix was defined w/o next pool: fc00:0:3::/48,64,name=pool1,next=pool2 fc00:0:4::/48,64,name=pool1 * fix no next pool when it was defined after referencing: fc00:0:3::/48,64,name=pool1,next=pool2 fc00:0:4::/48,64,name=pool2 * fix UB when next pool was set to same pool: fc00:0:3::/48,64,name=pool1,next=pool1 * add warning about empty/not defined next pools
2021-03-28radius: fix segfault regression after 62f7740033f05053a581e864742575a46ccc6da2[anp/hsw]
2021-03-23ipoe: recover common check-ip opt processingVladislav Grishenko
2021-03-20Fix unsigned bitfileds leftovers after 62f7740033f05053a581e864742575a46ccc6da2Vladislav Grishenko
2021-03-20Fixed some errors found by valgrind and pvs-studio (#11)[anp/hsw]
* Fix errors found by valgrind ==12312== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) ==12312== at 0x486CCF0: sendmsg (in /lib/libpthread-2.22.so) ==12312== by 0x12F57F: rtnl_talk (libnetlink.c:316) ==12312== by 0x132DA3: genl_resolve_mcg (genl.c:52) ==12312== by 0x484E1CB: init (vlan_mon.c:528) ==12312== by 0x484CDC0: vlan_mon_register_proto (vlan_mon.c:48) ==12312== by 0x510B763: load_vlan_mon (pppoe.c:1914) ==12312== by 0x510BFF2: load_config (pppoe.c:2064) ==12312== by 0x510C22A: pppoe_init (pppoe.c:2108) ==12312== by 0x483E9EB: triton_load_modules (triton.c:704) ==12312== by 0x1384B2: main (main.c:339) ==12312== Address 0xbedacdd8 is on thread 1's stack ==12312== in frame #2, created by genl_resolve_mcg (genl.c:23) ==12312== 15 bytes in 1 blocks are definitely lost in loss record 352 of 836 ==12312== at 0x482A9A9: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==12312== by 0x4B97524: strdup (in /lib/libc-2.22.so) ==12312== by 0x12C30C: init (telnet.c:769) ==12312== by 0x483E9EB: triton_load_modules (triton.c:704) ==12312== by 0x1384B2: main (main.c:339) ==12312== ==12312== 15 bytes in 1 blocks are definitely lost in loss record 353 of 836 ==12312== at 0x482A9A9: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==12312== by 0x4B97524: strdup (in /lib/libc-2.22.so) ==12312== by 0x12D60A: init (tcp.c:392) ==12312== by 0x483E9EB: triton_load_modules (triton.c:704) ==12312== by 0x1384B2: main (main.c:339) * Fix another warnings by cppcheck [accel-pppd/ctrl/ipoe/arp.c:256]: (error) Uninitialized variable: n [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 4) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 5) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:90]: (warning) %x in format string (no. 6) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 4) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 5) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:129]: (warning) %x in format string (no. 6) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 4) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 5) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/mac_filter.c:158]: (warning) %x in format string (no. 6) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ctrl/pppoe/pppoe.c:738]: (warning) Possible null pointer dereference [accel-pppd/ipv6/dhcpv6.c:911]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/ipv6/dhcpv6.c:911]: (warning) %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ipv6/dhcpv6.c:911]: (warning) %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ipv6/dhcpv6.c:911]: (warning) %x in format string (no. 4) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/libnetlink/libnetlink.c:515]: (warning) Possible null pointer dereference [accel-pppd/ppp/ipv6cp_opt_intfid.c:185]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ppp/ipv6cp_opt_intfid.c:298]: (warning) %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'int *'. [accel-pppd/ppp/ipv6cp_opt_intfid.c:298]: (warning) %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ppp/ipv6cp_opt_intfid.c:298]: (warning) %x in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [accel-pppd/ppp/ipv6cp_opt_intfid.c:298]: (warning) %x in format string (no. 4) requires 'unsigned int *' but the argument type is 'signed int *'. * Suppress compiler warnings * Fix locking errors /opt/pvs/accel-ppp/accel-pppd/extra/pppd_compat.c 279 warn V1020 The function exited without calling the 'sigchld_unlock' function. Check lines: 279, 249. /opt/pvs/accel-ppp/accel-pppd/extra/pppd_compat.c 333 warn V1020 The function exited without calling the 'sigchld_unlock' function. Check lines: 333, 315. /opt/pvs/accel-ppp/accel-pppd/extra/pppd_compat.c 422 warn V1020 The function exited without calling the 'sigchld_unlock' function. Check lines: 422, 372. /opt/pvs/accel-ppp/accel-pppd/extra/pppd_compat.c 488 warn V1020 The function exited without calling the 'sigchld_unlock' function. Check lines: 488, 468. /opt/pvs/accel-ppp/accel-pppd/triton/mempool.c 119 warn V1020 The function exited without calling the 'pthread_spin_unlock' function. Check lines: 119, 116. * Fix array len errors /opt/pvs/accel-ppp/accel-pppd/triton/conf_file.c 75 warn V557 Array underrun is possible. The value of 'len - 1' index could reach -1. /opt/pvs/accel-ppp/accel-pppd/triton/conf_file.c 76 warn V557 Array underrun is possible. The value of '-- len' index could reach -1. * Fix possible memory leaks /opt/pvs/accel-ppp/accel-pppd/radius/radius.c 936 err V773 The function was exited without releasing the 'str' pointer. A memory leak is possible. /opt/pvs/accel-ppp/accel-pppd/radius/serv.c 622 err V773 The function was exited without releasing the 'str' pointer. A memory leak is possible. /opt/pvs/accel-ppp/accel-pppd/triton/conf_file.c 144 err V773 The function was exited without releasing the 'raw' pointer. A memory leak is possible. * Fix unsafe code /opt/pvs/accel-ppp/accel-pppd/cli/tcp.c 364 warn V1004 The 'host' pointer was used unsafely after it was verified against nullptr. Check lines: 338, 364. /opt/pvs/accel-ppp/accel-pppd/cli/telnet.c 701 warn V1004 The 'host' pointer was used unsafely after it was verified against nullptr. Check lines: 675, 701. /opt/pvs/accel-ppp/accel-pppd/extra/ippool.c 241 err V614 Potentially uninitialized pointer 'pos' used. /opt/pvs/accel-ppp/accel-pppd/radius/dict.c 165 err V614 Uninitialized pointer 'parent_items' used. * Remove duplicate code /opt/pvs/accel-ppp/accel-pppd/radius/serv.c 202 warn V547 Expression 'ts.tv_sec < req->serv->fail_time' is always false. * Fix treating signed bool variables as unsigned * Add nullptr checking /opt/pvs/accel-ppp/accel-pppd/ipv6/dhcpv6.c 886 err V595 The 'opt->val' pointer was utilized before it was verified against nullptr. Check lines: 886, 890. /opt/pvs/accel-ppp/accel-pppd/ipv6/nd.c 479 err V595 The 'opt->val' pointer was utilized before it was verified against nullptr. Check lines: 479, 483. /opt/pvs/accel-ppp/accel-pppd/radius/auth.c 152 err V595 The 'rpd->auth_ctx' pointer was utilized before it was verified against nullptr. Check lines: 152, 154. /opt/pvs/accel-ppp/accel-pppd/triton/conf_file.c 114 err V595 The 'cur_sect' pointer was utilized before it was verified against nullptr. Check lines: 114, 117. * Add logging of exit conditions * Clarify calculation [accel-pppd/ppp/ccp_mppe.c:281]: (style) Clarify calculation precedence for '&' and '?'. [accel-pppd/ppp/ccp_mppe.c:282]: (style) Clarify calculation precedence for '&' and '?'. [accel-pppd/ppp/ccp_mppe.c:283]: (style) Clarify calculation precedence for '&' and '?'. [accel-pppd/ppp/ccp_mppe.c:284]: (style) Clarify calculation precedence for '&' and '?'. [accel-pppd/ppp/ccp_mppe.c:285]: (style) Clarify calculation precedence for '&' and '?'. [accel-pppd/ppp/ccp_mppe.c:286]: (style) Clarify calculation precedence for '&' and '?'. [drivers/ipoe/ipoe.c:307]: (style) Clarify calculation precedence for '&' and '?'. * Fix void calculations [accel-pppd/ctrl/pppoe/disc.c:211]: (portability) 'pkt' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/ctrl/pptp/pptp.c:150]: (portability) 'buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/acct.c:37]: (portability) 'req.pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/auth.c:35]: (portability) 'req.pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/auth.c:79]: (portability) 'req.pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/dm_coa.c:43]: (portability) 'pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/dm_coa.c:47]: (portability) 'pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/dm_coa.c:57]: (portability) 'pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/dm_coa.c:65]: (portability) 'req.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/dm_coa.c:97]: (portability) 'req.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/radius/serv.c:364]: (portability) 'req.pack.buf' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/triton/mempool.c:115]: (portability) 'mmap_ptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/triton/mempool.c:122]: (portability) 'mmap_ptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/triton/mempool.c:276]: (portability) 'ptr' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. * Fix void part 2 [accel-pppd/ipv6/dhcpv6.c:844]: (portability) 'conf_dnssl' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/ipv6/nd.c:199]: (portability) '(void*)dnsslinfo' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [accel-pppd/ipv6/nd.c:432]: (portability) 'conf_dnssl' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. * Fix null pointer dereference [accel-pppd/ctrl/ipoe/ipoe.c:2048]: (warning) Possible null pointer dereference: eth [accel-pppd/ctrl/ipoe/ipoe.c:2049]: (warning) Possible null pointer dereference: iph * Remove redundant check /opt/pvs/accel-ppp/accel-pppd/ctrl/l2tp/packet.c 656 warn V547 Expression 'attr->length <= 16' is always false. * PR fixes * PR fixes 2
2021-03-20ipv6, shaper: fix possible NULL-pointer dereferenceVladislav Grishenko
2021-03-20ipoe: fix NULL checkVladislav Grishenko
2021-03-20shaper: drop redundant checkVladislav Grishenko
leftover after 09f73dab273989c6f36efe548c4b5e83d83b5416
2021-03-20shaper: rework leaf-qdisc config parsingVladislav Grishenko
2021-03-20sstp: avoid using NULL as non-last varadic argumentVladislav Grishenko
2021-03-17Merge branch 'master' of github.com:xebd/accel-pppDmitry Kozlov