1 --- ppp-2.4.1/pppd/ipcp.c Thu Mar 8 06:11:12 2001
2 +++ ppp-2.4.1-new/pppd/ipcp.c Tue Jun 19 15:35:36 2001
5 if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
6 ipcp_script_state = s_up;
7 - ipcp_script(_PATH_IPUP);
8 + ipcp_script(path_ipup);
13 /* Execute the ip-down script */
14 if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
15 ipcp_script_state = s_down;
16 - ipcp_script(_PATH_IPDOWN);
17 + ipcp_script(path_ipdown);
21 @@ -1828,13 +1828,13 @@
23 if (ipcp_fsm[0].state != OPENED) {
24 ipcp_script_state = s_down;
25 - ipcp_script(_PATH_IPDOWN);
26 + ipcp_script(path_ipdown);
30 if (ipcp_fsm[0].state == OPENED) {
31 ipcp_script_state = s_up;
32 - ipcp_script(_PATH_IPUP);
33 + ipcp_script(path_ipup);
38 --- ppp-2.4.1/pppd/main.c Tue Mar 13 06:56:19 2001
39 +++ ppp-2.4.1-new/pppd/main.c Tue Jun 19 15:35:36 2001
41 struct protent *protp;
44 + strlcpy(path_ipup, "/etc/ppp/ip-up", sizeof(path_ipup));
45 + strlcpy(path_ipdown, "/etc/ppp/ip-down", sizeof(path_ipdown));
48 new_phase(PHASE_INITIALIZE);
51 --- ppp-2.4.1/pppd/options.c Tue Mar 13 06:56:19 2001
52 +++ ppp-2.4.1-new/pppd/options.c Tue Jun 19 15:38:32 2001
54 bool dump_options; /* print out option values */
55 bool dryrun; /* print out option values and exit */
56 char *domain; /* domain name set by domain option */
57 +char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
58 +char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
60 extern option_t auth_options[];
61 extern struct stat devstat;
63 "Print out option values after parsing all options", 1 },
64 { "dryrun", o_bool, &dryrun,
65 "Stop after parsing, printing, and checking options", 1 },
66 + { "ip-up-script", o_string, path_ipup,
67 + "Set pathname of ip-up script",
68 + OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
69 + { "ip-down-script", o_string, path_ipdown,
70 + "Set pathname of ip-down script",
71 + OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
74 { "multilink", o_bool, &multilink,
76 --- ppp-2.4.1/pppd/pathnames.h Thu Mar 8 06:15:37 2001
77 +++ ppp-2.4.1-new/pppd/pathnames.h Tue Jun 19 15:35:36 2001
79 #define _PATH_UPAPFILE _ROOT_PATH "/etc/ppp/pap-secrets"
80 #define _PATH_CHAPFILE _ROOT_PATH "/etc/ppp/chap-secrets"
81 #define _PATH_SYSOPTIONS _ROOT_PATH "/etc/ppp/options"
82 -#define _PATH_IPUP _ROOT_PATH "/etc/ppp/ip-up"
83 -#define _PATH_IPDOWN _ROOT_PATH "/etc/ppp/ip-down"
84 #define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up"
85 #define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down"
86 #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
88 --- ppp-2.4.1/pppd/pppd.h Tue Mar 13 06:54:37 2001
89 +++ ppp-2.4.1-new/pppd/pppd.h Tue Jun 19 15:39:39 2001
91 extern char *bundle_name; /* bundle name for multilink */
92 extern bool dump_options; /* print out option values */
93 extern bool dryrun; /* check everything, print options, exit */
94 +extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
95 +extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
98 extern struct bpf_program pass_filter; /* Filter for pkts to pass */