summaryrefslogtreecommitdiff
path: root/pppd/main.c
diff options
context:
space:
mode:
authorEivind Næss <eivnaes@yahoo.com>2021-08-06 09:14:02 -0700
committerEivind Næss <eivnaes@yahoo.com>2022-07-15 15:25:38 -0700
commit80b8744eb42c7493794f3e3fe0bf1ce14f53e6dd (patch)
tree68a56cc56bb20629f2a7304f1a323022eb4ebb2b /pppd/main.c
parenta6622771e2dc03a2682c86c4bcf6bf6ae9e85df7 (diff)
downloadppp-80b8744eb42c7493794f3e3fe0bf1ce14f53e6dd.tar.gz
Changing INET6 to PPP_WITH_IPV6CP and adding configure option
Based on feedback on PR #296, the option ipv6-support seems inconsistent with the existing ipxcp option. Futhermore, the #define has been renamed to avoid bleeding into third party projects. pppdconf.h is already distributed and will define or undefine the PPP_WITH_IPV6CP define. Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
Diffstat (limited to 'pppd/main.c')
-rw-r--r--pppd/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pppd/main.c b/pppd/main.c
index 2329437..cba4a92 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -91,6 +91,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <limits.h>
#include <inttypes.h>
#include "pppd.h"
@@ -98,7 +99,7 @@
#include "fsm.h"
#include "lcp.h"
#include "ipcp.h"
-#ifdef INET6
+#ifdef PPP_WITH_IPV6CP
#include "ipv6cp.h"
#endif
#include "upap.h"
@@ -271,7 +272,7 @@ struct protent *protocols[] = {
&cbcp_protent,
#endif
&ipcp_protent,
-#ifdef INET6
+#ifdef PPP_WITH_IPV6CP
&ipv6cp_protent,
#endif
&ccp_protent,
@@ -295,9 +296,9 @@ main(int argc, char *argv[])
strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
-#ifdef INET6
- strlcpy(path_ipv6up, _PATH_IPV6UP, sizeof(path_ipv6up));
- strlcpy(path_ipv6down, _PATH_IPV6DOWN, sizeof(path_ipv6down));
+#ifdef PPP_WITH_IPV6CP
+ strlcpy(path_ipv6up, _PATH_IPV6UP, MAXPATHLEN);
+ strlcpy(path_ipv6down, _PATH_IPV6DOWN, MAXPATHLEN);
#endif
link_stats_valid = 0;
new_phase(PHASE_INITIALIZE);