some bugfixes and additions for the default compile target
[openwrt.git] / package / ppp / patches / 101-debian_ip-up_option.patch
1 diff -ruNp ppp-2.4.3.orig/pppd/ipcp.c ppp-2.4.3/pppd/ipcp.c
2 --- ppp-2.4.3.orig/pppd/ipcp.c 2004-11-13 13:03:26.000000000 +0100
3 +++ ppp-2.4.3/pppd/ipcp.c 2005-02-20 18:45:22.241810136 +0100
4 @@ -1846,7 +1846,7 @@ ipcp_up(f)
5 */
6 if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
7 ipcp_script_state = s_up;
8 - ipcp_script(_PATH_IPUP);
9 + ipcp_script(path_ipup);
10 }
11 }
12
13 @@ -1896,7 +1896,7 @@ ipcp_down(f)
14 /* Execute the ip-down script */
15 if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
16 ipcp_script_state = s_down;
17 - ipcp_script(_PATH_IPDOWN);
18 + ipcp_script(path_ipdown);
19 }
20 }
21
22 @@ -1950,13 +1950,13 @@ ipcp_script_done(arg)
23 case s_up:
24 if (ipcp_fsm[0].state != OPENED) {
25 ipcp_script_state = s_down;
26 - ipcp_script(_PATH_IPDOWN);
27 + ipcp_script(path_ipdown);
28 }
29 break;
30 case s_down:
31 if (ipcp_fsm[0].state == OPENED) {
32 ipcp_script_state = s_up;
33 - ipcp_script(_PATH_IPUP);
34 + ipcp_script(path_ipup);
35 }
36 break;
37 }
38 diff -ruNp ppp-2.4.3.orig/pppd/main.c ppp-2.4.3/pppd/main.c
39 --- ppp-2.4.3.orig/pppd/main.c 2005-02-20 18:46:14.409879384 +0100
40 +++ ppp-2.4.3/pppd/main.c 2005-02-20 18:45:22.243809832 +0100
41 @@ -314,6 +314,9 @@ main(argc, argv)
42 struct protent *protp;
43 char numbuf[16];
44
45 + strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
46 + strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
47 +
48 link_stats_valid = 0;
49 new_phase(PHASE_INITIALIZE);
50
51 diff -ruNp ppp-2.4.3.orig/pppd/options.c ppp-2.4.3/pppd/options.c
52 --- ppp-2.4.3.orig/pppd/options.c 2005-02-20 18:46:14.410879232 +0100
53 +++ ppp-2.4.3/pppd/options.c 2005-02-20 18:46:02.154742448 +0100
54 @@ -108,6 +108,8 @@ char linkname[MAXPATHLEN]; /* logical na
55 bool tune_kernel; /* may alter kernel settings */
56 int connect_delay = 1000; /* wait this many ms after connect script */
57 int req_unit = -1; /* requested interface unit */
58 +char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
59 +char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
60 bool multilink = 0; /* Enable multilink operation */
61 char *bundle_name = NULL; /* bundle name for multilink */
62 bool dump_options; /* print out option values */
63 @@ -276,6 +278,13 @@ option_t general_options[] = {
64 "Number of seconds to wait for child processes at exit",
65 OPT_PRIO },
66
67 + { "ip-up-script", o_string, path_ipup,
68 + "Set pathname of ip-up script",
69 + OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
70 + { "ip-down-script", o_string, path_ipdown,
71 + "Set pathname of ip-down script",
72 + OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
73 +
74 #ifdef HAVE_MULTILINK
75 { "multilink", o_bool, &multilink,
76 "Enable multilink operation", OPT_PRIO | 1 },
77 diff -ruNp ppp-2.4.3.orig/pppd/pppd.h ppp-2.4.3/pppd/pppd.h
78 --- ppp-2.4.3.orig/pppd/pppd.h 2005-02-20 18:46:14.414878624 +0100
79 +++ ppp-2.4.3/pppd/pppd.h 2005-02-20 18:45:22.247809224 +0100
80 @@ -312,6 +312,8 @@ extern bool tune_kernel; /* May alter ke
81 extern int connect_delay; /* Time to delay after connect script */
82 extern int max_data_rate; /* max bytes/sec through charshunt */
83 extern int req_unit; /* interface unit number to use */
84 +extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
85 +extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
86 extern bool multilink; /* enable multilink operation */
87 extern bool noendpoint; /* don't send or accept endpt. discrim. */
88 extern char *bundle_name; /* bundle name for multilink */
This page took 0.042604 seconds and 5 git commands to generate.