-
Notifications
You must be signed in to change notification settings - Fork 234
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
Header file reorganization and cleaning up the public API for pppd version 2.5.0 #379
Conversation
@paulusmack @Neustradamus - Hope you have a Merry Christmas! |
@enaess: Good job! @paulusmack: When is the date for 2.5.0 release build? |
@jkroonza I did cherry pick your radius changes into this branch. Would you be able to help with some QA here by building and trying this branch? I've been connected over sstpc for days. Though that is only one aspect of this. Also, does your environment do VPN, PPPoE or similar? Looks like your change indicates you are using the radius plugin, does that also include radattr, radrealms too? |
@pali you able to review and maybe test this change on your setup? |
I can perform some basic tests albeit not in my production environment, so will have to deploy elsewhere but will include: PPP/L2TP(/IPSec) All of these in both client and server, but will not be able to perform massive "long" tests, nor high throughput, but given that ppp is mostly handled by kernel nowadays I believe that the above should be adequate. |
That sounds perfect. I may need to create a PR against RP-PPPOE first. Maybe during my lunch break today (1pm PST). Does any of your test bed situation also include radius the radius modules or byte counting? |
Most of our auth happens against radius, so by implication yes, will have to transfer some large files to ensure that we get the >32-bit counters tested too. |
@jkroonza I wasn't able to run autoconf so you may need to manually toggle some of the #ifdef to #ifndef for the headers I included. Ideally, those should be a bart of the change too... |
@enaess: You can see here: |
@Neustradamus Yes, I forked that repository and made my changes. Eventually, I hope to create a PR onto that branch you sent the link to |
This looks like great work. The only comment I have so far is that I want to have my copyright on options.h and multilink.h, not CMU's copyright, since I am the original author of the code in those files. |
@paulusmack consider it done |
@paulusmack Did the commit, though options.c didn't change copyright and still holds that of CMU. Should that file be "dual-copyright" or just leave it alone? |
@paulusmack - just a few notes here. @jkroonza is helping out with testing some of the L2TP/PPTP and PPPoE changes. I am about to open a PR to the rp-pppoe project. And I've added needed changes for network-manager-sstp and sstp-client projects. There still may be a stray variable or so that has found its way into other projects, but I can try to create a PR for some of the major ones, e.g. network-manager, and xl2tpd. That has still to come, but the changes is steadily becoming more stable. |
I will check where that code comes from. I would have written most of it, so at least it should have my copyright as well as CMU, but the question is whether there is any code from CMU in there. |
I just had network-manager project and xl2tpd compile against pppd and this patch. No further changes needed in that regards. Let me know if there are other projects you'd like to test against. |
@jkroonza Did you have a chance to smoke test this change on your rig? For your reference, I forked rp-pppoe with the changes here: https://salsa.debian.org/eivnaes/rp-pppoe |
Sure, I'll rebase patch to this repo when ready. What I did on salsa was mostly on a whim so @jkroonza could test it |
I have not ... been trying to spend time with the family and this year kicked off with a big bang ... going to fire up the test host later this afternoon. The PR for rp-pppoe will need to remain such that rp-pppoe will compile against both older and newer versions of ppp ... |
Yes I know, I did this change on a whim so you had something you could build with, and to check if any additional functions are needed to be exported. |
@jkroonza did you have time to look into smoke testing this. Time is of essence now |
@paulusmack I did some more smoke testing of the pppoe (and rp-pppoe) against accel-pppd. These modules still work, no problem. This change is ready to merge. Let's get 2.5.0 out the door. |
News so far is not good, but I'm still trying to confirm exactly what's going on, my incoming test is failing to auth, but what bugs me is I'm receiving a SIGTERM from xl2tpd for some reason, and thereafter pppd itself still segfaults (sorry, I have to obfuscate quite a bit):
I suspect the remote side (it's either CISCO or Huawei, which exactly I can't reliably tell since we know the specific FNO uses a mix) is just faster after LCP TermReq to tear down and then close the l2tp tunnel, resulting in xl2tpd sending SIGTERM prior to pppd itself terminating. The Fatal signal 11 is SIGSEGV, I don't have a backtrace, will need to figure out how to get a core dump generated. This PR is causing the SIGSEGV though, since when using the master branch this doesn't occur. Busy trying to fix the underlying auth issue (which is caused by me uninstalling the system pppd and it took a bunch of critical config files with it). |
If you did a "sudo make install", then please check your /etc/ppp/chap-secrets, it may have been replaced. That should allow pppd to use mschapv2 if that is what you configured. At the point you receive a SIGSEGV (11), is after it is being signaled a SIGTERM (15) so there maybe some cleanup logic that isn't working 100%, not sure; but that is also something we can fix in a follow up release. But I'll take another look at the changes related to signaling. |
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
…ppd.h Signed-off-by: Eivind Næss <[email protected]>
… should improve clarity in the crypto subsystem. Also adding comments to the crypto.h as it is a public API Signed-off-by: Eivind Næss <[email protected]>
- chap-md5.h is an internal headerfile, don't install - At this point, there is nothing new with chap-new, it's the chap implementation - chap_ms.c contains the specific Microsoft specific defines Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Naess <[email protected]> Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
…o check, i.e. in_phase(); then unexporting phase in pppd-private.h Signed-off-by: Eivind Naess <[email protected]>
… pppd-private.h Signed-off-by: Eivind Næss <[email protected]>
…n already deprecated and there is an API in place for it Signed-off-by: Eivind Næss <[email protected]>
Signed-off-by: Eivind Naess <[email protected]>
…() function. Moving variables and functions to tty.c Signed-off-by: Eivind Naess <[email protected]>
…g files installed Signed-off-by: Eivind Næss <[email protected]>
…options.h should be his Signed-off-by: Eivind Næss <[email protected]>
…ad the equivalent of mp_on defined to 0, meaning \!0 would execute code below Signed-off-by: Eivind Naess <[email protected]>
Signed-off-by: Eivind Næss <[email protected]>
Last push was due to rebase and syncing up branch with ppp-project/ppp. Checks still passes. What do you think @paulusmack? |
Thanks @paulusmack for merging, @enaess for this big work, @jkroonza and @dfskoll for comments... :) |
* pppd/ipcp.c: (ipcp_down): fix comment * pppd/main.c: (reset_link_stats): reset print_link_stats to 1, set start_time even if get_ppp_stats fails. This is an attempt to fix the problem noted in the linux-ppp mailing list on mar-26-2024 and may-03-2024 under the subject "ppp-2.5.0 sometimes doesn't print stats on terminating on signal 2" The sent/recv log messages were being lost, especially with the persist option. This seems to be an oversight during reorg in commit ba7f7e0 "Header file reorganization and cleaning up the public API for pppd version 2.5.0 (ppp-project#379)" around the repurposing of the link_stats_valid variable as link_stats_print. It also fixes a stray reference to the old variable in a comment. please review. the reordering in reset_link_stats Signed-off-by: S Madhu <[email protected]>
* pppd/ipcp.c: (ipcp_down): fix comment * pppd/main.c: (reset_link_stats): reset print_link_stats to 1, set start_time even if get_ppp_stats fails. This is an attempt to fix the problem noted in the linux-ppp mailing list on mar-26-2024 and may-03-2024 under the subject "ppp-2.5.0 sometimes doesn't print stats on terminating on signal 2" The sent/recv log messages were being lost, especially with the persist option. This seems to be an oversight during reorg in commit ba7f7e0 "Header file reorganization and cleaning up the public API for pppd version 2.5.0 (ppp-project#379)" around the repurposing of the link_stats_valid variable as link_stats_print. It also fixes a stray reference to the old variable in a comment. please review the reordering in reset_link_stats Signed-off-by: S Madhu <[email protected]>
* pppd/ipcp.c: (ipcp_down): fix comment * pppd/main.c: (reset_link_stats): reset print_link_stats to 1, set start_time even if get_ppp_stats fails. This is an attempt to fix the problem noted in the linux-ppp mailing list on mar-26-2024 and may-03-2024 under the subject "ppp-2.5.0 sometimes doesn't print stats on terminating on signal 2" The sent/recv log messages were being lost, especially with the persist option. This seems to be an oversight during reorg in commit ba7f7e0 "Header file reorganization and cleaning up the public API for pppd version 2.5.0 (#379)" around the repurposing of the link_stats_valid variable as link_stats_print. It also fixes a stray reference to the old variable in a comment. Signed-off-by: S Madhu <[email protected]>
Summary:
Much of pppd.h used to pile on a bunch of extern declarations for internal use in other files of pppd. This was never meant as a "public API" to be exported and used by others. This change tries to limit that extensively by hiding the extern declarations into pppd-private.h (by virtue of git mv pppd.h to pppd-private.h to retain source control history, and creating a new pppd.h) and migrating only needed functions back into pppd.h for plugins to compile.
I've compiled a few different projects with the new pppd headers. It's is a breaking change, but plugin maintainers will have to do some maintenance here anyways...
This change reorganizes the header files:
This change was the continuation of a conversation starting out in PR#349 (#349).