Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPP ifname enhanced #289

Closed
wants to merge 48 commits into from
Closed

PPP ifname enhanced #289

wants to merge 48 commits into from

Commits on Dec 21, 2021

  1. pppoe: Remove rp-pppoe.so symlink to not conflict with real rp-pppoe.…

    …so plugin (#304)
    
    Backward compatibility symlink is there already for one ppp release. Remove
    it for next ppp release to not conflict with real rp-pppoe.so plugin. So
    both ppp's pppoe.so and rp's rp-pppoe.so plugins can be installed together.
    
    Now when conversion to automake was done, it is a good time to drop this
    problematic symlink from default installation.
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    b33d938 View commit details
    Browse the repository at this point in the history
  2. Fixing up a few inconsistencies in configure.ac (#306)

    Options that specify --with-logfile-dir, or --with-plugin-dir, or --with-runtime-dir needs to be specified using AC_ARG_WITH, not AC_ARG_ENABLE.
    
    If you try to specify --without-openssl, then the conditions should be tested against = "xyes". There is a case where the option is either blank or is set to "xno" and the former case wasn't properly handled.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    f132d84 View commit details
    Browse the repository at this point in the history
  3. pppd: Remove usage of incorrect constant MAXIFNAMELEN

    MAXIFNAMELEN is currently hardcoded to 32, but maximal size of interface
    name on Linux is just 15 + nul-term byte. This limit is already provided by
    IFNAMSIZ macro defined in net/if.h header file.
    
    So replace MAXIFNAMELEN usage by IFNAMSIZ to not silently truncate
    interface name.
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    add6ea3 View commit details
    Browse the repository at this point in the history
  4. pppd: Replace IF_NAMESIZE by IFNAMSIZ for struct ifreq

    Macros IF_NAMESIZE and IFNAMSIZ should be defined to the same value, but
    struct ifreq uses IFNAMSIZ. So use "correct" macro.
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    6ebd16a View commit details
    Browse the repository at this point in the history
  5. PPP enhanced ifname

    EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    330948b View commit details
    Browse the repository at this point in the history
  6. Fix conficts

    EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    672d465 View commit details
    Browse the repository at this point in the history
  7. README.pppoe: Fix spelling (#316)

    Minor spelling fix.
    
    Signed-off-by: Gustavo Romero <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    gromero authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    a1ae582 View commit details
    Browse the repository at this point in the history
  8. radattr: tighten permissions on radattr file to avoid information lea…

    …kage. (#290)
    
    Depending on the invoking process's umask it's possible that the radattr
    file (which in certain cases can contain crytographic keys) be stored
    with permissions such that world-read access is possible, resulting in
    sensitive information being leaked to local users.
    
    Signed-off-by: Jaco Kroon <[email protected]>
    Co-authored-by: Jaco Kroon <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    2 people authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    5f9153b View commit details
    Browse the repository at this point in the history
  9. pppd: Fix usage of BOTHER ioctl API on Linux (#314)

    Linux architectures have different content of struct termios2 and also
    different value of BOTHER macro. So do not declare any struct termios2 nor
    BOTHER macro. Current definitions in ppp were applicable only for x86.
    
    Correct definitions for current architecture are only in <asm/termbits.h>
    and <asm/ioctls.h> header files. But Linux header file <asm/termbits.h> is
    in conflict with glibc header file <termios.h> and only one can be included
    in one source unit. Moreover both header files contains struct termios but
    with different content. So it is not possible to use glibc tc* functions
    with <asm/termbits.h> definitions.
    
    For this reason provide a new include header file "termios_linux.h" which
    provides custom implementation of all glibc's termios.h functions via Linux
    ioctl() interface with definitions from Linux <asm/termbits.h> header file.
    
    Thus this "termios_linux.h" is replacement for <termios.h> with additional
    support for BOTHER Linux termios API.
    
    Same "termios_linux.h" is going to be used by U-Boot's kwboot utility for
    the same reason to use arbitrary baudrate value via BOTHER ioctl API.
    
    Hopefully one day glibc will provide some API functions for functionality
    provided currently by BOTHER Linux API.
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    6ca85f1 View commit details
    Browse the repository at this point in the history
  10. Fixing main.c with regards to default GCC/CLANG compiler warnings

    This also incorporates the comments from @paulusmack.
    
    Generally, fixes:
    - Suppresed warnings w.r.t. unused results in signal handling and result from write()
    - Unused results w.r.t. setuid/getuid/chdir
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    ac0cfaa View commit details
    Browse the repository at this point in the history
  11. Fixing compiler warnings with regards to GCC, w.r.t. unused results o…

    …f setuid/setgid
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    be26ec6 View commit details
    Browse the repository at this point in the history
  12. Fixing compiler warning with GCC, -Wunused-result and write()

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    ef9eeef View commit details
    Browse the repository at this point in the history
  13. Fixing GCC warning -Wunused-result with setgid in winbind.c

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    249180e View commit details
    Browse the repository at this point in the history
  14. Fixing GCC compile warning with unused result from setgid/setuid.

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    e9f3910 View commit details
    Browse the repository at this point in the history
  15. Fixing GCC warning with unused return value from ftruncate().

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    80923d6 View commit details
    Browse the repository at this point in the history
  16. Fixing GCC unused result warning w.r.t. fchown() and fchmod() functions.

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    e020028 View commit details
    Browse the repository at this point in the history
  17. Fixing CLang warnings w.r.t. GNU-style designator in structure declar…

    …ation
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    85ed080 View commit details
    Browse the repository at this point in the history
  18. Fixing CLang warning with regards to GNU old-style designator in stru…

    …cture initialization.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    eaef612 View commit details
    Browse the repository at this point in the history
  19. Fixing CLang warnings related to using pointers of different signedne…

    …ss (int* vs unsigned int* in definition of socklen_t).
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    c3c5084 View commit details
    Browse the repository at this point in the history
  20. Fixing CLang warning: format specifies type 'unsigned short' but the …

    …argument has type 'int'
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    329ae15 View commit details
    Browse the repository at this point in the history
  21. Fixing signed vs. unsigned char * in strcpy operation.

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    6f82c38 View commit details
    Browse the repository at this point in the history
  22. Fixing signed vs. unsigned char* warnings in avpair.c

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    364bf1b View commit details
    Browse the repository at this point in the history
  23. CLang detected possible invalid memory access (-Wsizeof-pointer-memac…

    …cess)
    
    rc_find_server() resets the secret by setting *secret = 0 instead of what
    was likely intended: memset the entire array. In case of error, moved the
    memset operation outside of the rc_find_server() function. It's only used
    in one place anyway.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    e0926d5 View commit details
    Browse the repository at this point in the history
  24. Fixing CLang -Wpointer-sign warnings in sendserver.c

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    fd32c72 View commit details
    Browse the repository at this point in the history
  25. Clang complained about -Wformat in passing a int for %h in snprintf. …

    …Result would have been the same.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    51a5b08 View commit details
    Browse the repository at this point in the history
  26. Fixing CLang [-Wpointer-sign] warning in radius.c

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    890cfef View commit details
    Browse the repository at this point in the history
  27. Fixing CLang [-Wcomment] warning for using /* inside of a /* comment.

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    bdd7ed5 View commit details
    Browse the repository at this point in the history
  28. Fixing CLang [-Wpointer-sign] warning in winbind.c

    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    b6827a7 View commit details
    Browse the repository at this point in the history
  29. Fixing GCC -Wunused-result warning in chat.c resolving comments from …

    …Paul Mackerras
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    30e0316 View commit details
    Browse the repository at this point in the history
  30. Fix for CLang -Wformat-overflow warning, expand the destination array…

    … to fit a number.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    35759e7 View commit details
    Browse the repository at this point in the history
  31. CI: Perform installation step

    This ensures installation code to be tested.
    
    Signed-off-by: Adrian Ban <[email protected]>
    Chocobo1 authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    2355fbb View commit details
    Browse the repository at this point in the history
  32. CI: Remove redundant check

    The step is already covered by `make distcheck`.
    
    Signed-off-by: Adrian Ban <[email protected]>
    Chocobo1 authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    876b4b3 View commit details
    Browse the repository at this point in the history
  33. CI: Deduplicate configure flags by using a variable

    Signed-off-by: Adrian Ban <[email protected]>
    Chocobo1 authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    9e281c8 View commit details
    Browse the repository at this point in the history
  34. pppd: add experimental support for PEAP protocol, an extension of EAP

    current patch implements client functionality for PEAPv0/EAP-MSCHAPv2,
    which is usually the most common setup deployed by companies utilizing
    Microsoft RRAS as their VPN solution
    
    Signed-off-by: Rustam Kovhaev <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    rustylife authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    6d5a01e View commit details
    Browse the repository at this point in the history
  35. Improve the PEAP contribution by Rustam Kovhaev

    These changes adds to his contribution by
    
      * Adding options to perform CA/CRL checking and certificate validation
        consistent with what is already been done for EAP-TLS
      * Certificate validation is now in line with what is already been done
        for EAP-TLS. Users can now set "remotename" and "tls-verify-method" to
        control these.
      * Validation of certificate purpose and extended key usage is controlled
        by the option "tls-verify-key-usage".
      * Fixing up MPPE key generation to use the new API for handling MPPE keys
      * Man page is updated where appropriate for the new options.
      * Added unit-tests for the PEAP code in case of crypto or parameters would
        change in the future.
      * Added the peap feature to configure scripts. Users can now control the
        feature by specifying --enable-peap/--disable-peap.
    
    To acheive feature parity with the EAP-TLS change, the EAP-TLS common code was
    refactored into tls.c/.h such that it could be re-used in both instances.
    
    Using PEAP/MSCHAPv2 is now supported in PPPD with this change.
    
    Signed-off-by: Eivind Næss <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    enaess authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    1a8318d View commit details
    Browse the repository at this point in the history
  36. Add option to ask peer for WINS address

    Signed-off-by: Michael Everitt <[email protected]>
    Signed-off-by: Lars Wendler <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    vapier authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    bf41b37 View commit details
    Browse the repository at this point in the history
  37. Fix situation where peer may NAK with request for MS_WINS

    Previously, if configure-request is sent without MS_WINS[12], a
    peer may return a NAK with a request for it. However, code in the
    ipcp_nakci didn't handle this case properly. This patch fixes it
    to set try.req_wins[12].
    
    Signed-off-by: Michael Everitt <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    mjeveritt authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    3b254e9 View commit details
    Browse the repository at this point in the history
  38. pppol2tp.c add '#ifdef INET6' for optional ipv6

    Without it, l2tp daemon can't launch ppp, cuz undefined symbol ipv6_up_notifier.
    
    Signed-off-by: Adrian Ban <[email protected]>
    str8fast authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    f8406b9 View commit details
    Browse the repository at this point in the history
  39. pppd: Add ipv6-{up,down}-script options (#321)

    These allow a user to specify the paths to the scripts
    usually located at /etc/ppp/ipv6-up and /etc/ppp/ipv6-down,
    similarly to the existing ip-up-script and ip-down-script
    options
    
    Signed-off-by: Daniel Barlow <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    telent authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    b318702 View commit details
    Browse the repository at this point in the history
  40. pppoe: Rename variable printACNames to pppoe_verbose to match cmdline…

    … option
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    8a7e023 View commit details
    Browse the repository at this point in the history
  41. pppoe: Split function discovery() into phases discovery1() and discov…

    …ery2()
    
    pppoe-discovery.c needs to call only the first phase of discovery.
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    2bf4f78 View commit details
    Browse the repository at this point in the history
  42. pppoe: Do not use lcp_allowoptions[] and lcp_wantoptions[] in discove…

    …ry.c code
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    ca4d7ff View commit details
    Browse the repository at this point in the history
  43. pppoe: Show verbose information about all concentrator when pppoe-ver…

    …bose option is set
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    fc05868 View commit details
    Browse the repository at this point in the history
  44. pppoe: Dump discovery packets when pppoe-verbose option is set to >= 2

    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    34c72a6 View commit details
    Browse the repository at this point in the history
  45. pppoe: Do not use %.*v and %.*B formats which are unsupported by C pr…

    …intf()
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    811c497 View commit details
    Browse the repository at this point in the history
  46. pppoe-discovery: Define function and variables which are used by pppo…

    …e plugin code
    
    Signed-off-by: Pali Rohár <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    pali authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    cdb5d07 View commit details
    Browse the repository at this point in the history
  47. pppoe: Print packet fields in hex if they contain non-printable chara…

    …cters
    
    This adds logic to pppoe_printpkt to print text fields as hex if the
    field contains any non-printable characters.  This is so that a
    malicious, buggy or hacked access concentrator can't cause us to send
    non-printing characters to syslog.
    
    Signed-off-by: Paul Mackerras <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    paulusmack authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    daf007d View commit details
    Browse the repository at this point in the history
  48. Updated Solaris CI action to fix build error on macOS greater than 10…

    ….15. (#327)
    
    Signed-off-by: RICCIARDI-Adrien <[email protected]>
    Signed-off-by: Adrian Ban <[email protected]>
    RICCIARDI-Adrien authored and EasyNetDev committed Dec 21, 2021
    Configuration menu
    Copy the full SHA
    c529c17 View commit details
    Browse the repository at this point in the history