|
@@ -9,21 +9,22 @@
|
|
|
#ifdef CHAPMS
|
|
|
#include "chap_ms.h"
|
|
|
#define MDTYPE_ALL (MDTYPE_MICROSOFT_V2 | MDTYPE_MICROSOFT | MDTYPE_MD5)
|
|
|
-@@ -481,6 +483,18 @@ chap_respond(struct chap_client_state *cs, int id,
|
|
|
+@@ -492,6 +494,19 @@ chap_respond(struct chap_client_state *c
|
|
|
p[2] = len >> 8;
|
|
|
p[3] = len;
|
|
|
|
|
|
-+ if (npppd > 1) {
|
|
|
-+ if (syncppp(npppd) < 0) {
|
|
|
-+ error("syncppp sync fail");
|
|
|
-+ sem_unlink(SEM_COUNT_NAME);
|
|
|
-+ sem_unlink(SEM_BLOCK_NAME);
|
|
|
-+ } else {
|
|
|
-+ info("syncppp sync succeeded");
|
|
|
-+ }
|
|
|
-+ } else {
|
|
|
-+ info("syncppp not active");
|
|
|
-+ }
|
|
|
++ if (npppd > 1) {
|
|
|
++ if (syncppp(npppd) < 0) {
|
|
|
++ error("syncppp sync fail");
|
|
|
++ sem_unlink(SEM_COUNT_NAME);
|
|
|
++ sem_unlink(SEM_BLOCK_NAME);
|
|
|
++ } else {
|
|
|
++ info("syncppp sync succeeded");
|
|
|
++ }
|
|
|
++ } else {
|
|
|
++ info("syncppp not active");
|
|
|
++ }
|
|
|
++
|
|
|
+
|
|
|
output(0, response, PPP_HDRLEN + len);
|
|
|
}
|
|
@@ -55,37 +56,38 @@
|
|
|
#
|
|
|
COPTS = -O2 -pipe -Wall -g
|
|
|
-LIBS = -lrt
|
|
|
-+LIBS = -lpthread
|
|
|
++LIBS = -lrt -lpthread
|
|
|
|
|
|
# Uncomment the next line to include support for Microsoft's
|
|
|
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
|
|
--- a/pppd/options.c
|
|
|
+++ b/pppd/options.c
|
|
|
-@@ -123,6 +123,7 @@ bool dump_options; /* print out option values */
|
|
|
+@@ -128,6 +128,7 @@ bool dump_options; /* print out option
|
|
|
bool dryrun; /* print out option values and exit */
|
|
|
char *domain; /* domain name set by domain option */
|
|
|
int child_wait = 5; /* # seconds to wait for children at exit */
|
|
|
-+int npppd = 0; /* synchronize between multiple pppd */
|
|
|
++int npppd = 0; /* synchronize between multiple pppd */
|
|
|
struct userenv *userenv_list; /* user environment variables */
|
|
|
int dfl_route_metric = -1; /* metric of the default route to set over the PPP link */
|
|
|
|
|
|
-@@ -312,6 +313,9 @@ option_t general_options[] = {
|
|
|
- "Unset user environment variable",
|
|
|
- OPT_A2PRINTER | OPT_NOPRINT, (void *)user_unsetprint },
|
|
|
+@@ -342,6 +343,10 @@ option_t general_options[] = {
|
|
|
+ "Set pathname of ipv6-down script",
|
|
|
+ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
|
|
|
|
|
|
+ { "syncppp", o_int, &npppd,
|
|
|
+ "sync among multiple pppd when sending chap/pap respond", OPT_PRIO },
|
|
|
+
|
|
|
- { "defaultroute-metric", o_int, &dfl_route_metric,
|
|
|
- "Metric to use for the default route (Linux only; -1 for default behavior)",
|
|
|
- OPT_PRIV|OPT_LLIMIT|OPT_INITONLY, NULL, 0, -1 },
|
|
|
++
|
|
|
+ #ifdef HAVE_MULTILINK
|
|
|
+ { "multilink", o_bool, &multilink,
|
|
|
+ "Enable multilink operation", OPT_PRIO | 1 },
|
|
|
--- a/pppd/pppd.h
|
|
|
+++ b/pppd/pppd.h
|
|
|
-@@ -341,6 +341,7 @@ extern char *bundle_name; /* bundle name for multilink */
|
|
|
+@@ -343,6 +343,7 @@ extern char *bundle_name; /* bundle name
|
|
|
extern bool dump_options; /* print out option values */
|
|
|
extern bool dryrun; /* check everything, print options, exit */
|
|
|
extern int child_wait; /* # seconds to wait for children at end */
|
|
|
-+extern int npppd; /* synchronize between multiple pppd */
|
|
|
++extern int npppd; /* synchronize between multiple pppd */
|
|
|
|
|
|
#ifdef MAXOCTETS
|
|
|
extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */
|
|
@@ -197,7 +199,7 @@
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ info("syncppp not active");
|
|
|
-+ }
|
|
|
++ }
|
|
|
+
|
|
|
output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
|
|
|
|