]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
Ensure there is a '/' between PPP_PATH_VARRUN and the PID filename (#427)
[ppp.git] / pppd / main.c
index 932855ee31d90e34a825944d1db3f001101d0355..c207d1038b0928068a3603d8b059a114953ed4a7 100644 (file)
@@ -888,7 +888,7 @@ create_pidfile(int pid)
 {
     FILE *pidfile;
 
-    slprintf(pidfilename, sizeof(pidfilename), "%s%s.pid",
+    slprintf(pidfilename, sizeof(pidfilename), "%s/%s.pid",
             PPP_PATH_VARRUN, ifname);
     if ((pidfile = fopen(pidfilename, "w")) != NULL) {
        fprintf(pidfile, "%d\n", pid);
@@ -907,7 +907,7 @@ create_linkpidfile(int pid)
     if (linkname[0] == 0)
        return;
     ppp_script_setenv("LINKNAME", linkname, 1);
-    slprintf(linkpidfile, sizeof(linkpidfile), "%sppp-%s.pid",
+    slprintf(linkpidfile, sizeof(linkpidfile), "%s/ppp-%s.pid",
             PPP_PATH_VARRUN, linkname);
     if ((pidfile = fopen(linkpidfile, "w")) != NULL) {
        fprintf(pidfile, "%d\n", pid);
@@ -2038,8 +2038,10 @@ struct notifier **get_notifier_by_type(ppp_notify_t type)
         [NF_SIGNALED    ] = &sigreceived,
         [NF_IP_UP       ] = &ip_up_notifier,
         [NF_IP_DOWN     ] = &ip_down_notifier,
+#ifdef PPP_WITH_IPV6CP
         [NF_IPV6_UP     ] = &ipv6_up_notifier,
         [NF_IPV6_DOWN   ] = &ipv6_down_notifier,
+#endif
         [NF_AUTH_UP     ] = &auth_up_notifier,
         [NF_LINK_DOWN   ] = &link_down_notifier,
         [NF_FORK        ] = &fork_notifier,