]> git.ozlabs.org Git - ppp.git/commitdiff
Merge pull request #365 from enaess/ppp-options
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 9 Sep 2022 02:06:37 +0000 (12:06 +1000)
committerGitHub <noreply@github.com>
Fri, 9 Sep 2022 02:06:37 +0000 (12:06 +1000)
Add option to show all options (show-options)

1  2 
pppd/main.c

diff --combined pppd/main.c
index 8d5f32bb6efc8d55f121272900d527f76cc08427,2eec96641696273fe1eb65cce9a683539108cd69..b302c08e0659379fd23896e20bdd287d3c7041d9
  #include "ccp.h"
  #include "ecp.h"
  #include "pathnames.h"
 +#include "ppp-crypto.h"
  
  #ifdef PPP_WITH_TDB
  #include "tdb.h"
@@@ -295,8 -294,6 +295,8 @@@ main(int argc, char *argv[]
      struct protent *protp;
      char numbuf[16];
  
 +    PPP_crypto_init();
 +
      strlcpy(path_ipup, PPP_PATH_IPUP, MAXPATHLEN);
      strlcpy(path_ipdown, PPP_PATH_IPDOWN, MAXPATHLEN);
  
      if (debug)
        setlogmask(LOG_UPTO(LOG_DEBUG));
  
+     if (show_options) {
+       showopts();
+       die(0);
+     }
      /*
       * Check that we are running as root.
       */
        }
      }
  
 +    PPP_crypto_deinit();
      die(status);
      return 0;
  }