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