diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-20 21:42:07 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-20 21:42:07 +0000 |
commit | d1c05d734b93897277998645b8b2e16a2da3aefb (patch) | |
tree | 471cfb1ce0a1a4e09edd577ffbb146a13549afe9 | |
parent | 0798d4a5c7035bb545dd94527d04fa12b901db15 (diff) | |
download | upstream-d1c05d734b93897277998645b8b2e16a2da3aefb.tar.gz upstream-d1c05d734b93897277998645b8b2e16a2da3aefb.tar.bz2 upstream-d1c05d734b93897277998645b8b2e16a2da3aefb.zip |
pppd: add a patch for overriding the path to /etc/ppp/ipv6-{up,down}
SVN-Revision: 28497
6 files changed, 101 insertions, 18 deletions
diff --git a/package/ppp/patches/120-debian_ipv6_updown_option.patch b/package/ppp/patches/120-debian_ipv6_updown_option.patch new file mode 100644 index 0000000000..e5ccb10750 --- /dev/null +++ b/package/ppp/patches/120-debian_ipv6_updown_option.patch @@ -0,0 +1,83 @@ +--- a/pppd/main.c ++++ b/pppd/main.c +@@ -318,6 +318,8 @@ main(argc, argv) + + strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup)); + strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown)); ++ strlcpy(path_ipv6up, _PATH_IPV6UP, sizeof(path_ipv6up)); ++ strlcpy(path_ipv6down, _PATH_IPV6DOWN, sizeof(path_ipv6down)); + + link_stats_valid = 0; + new_phase(PHASE_INITIALIZE); +--- a/pppd/options.c ++++ b/pppd/options.c +@@ -115,6 +115,8 @@ int connect_delay = 1000; /* wait this m + int req_unit = -1; /* requested interface unit */ + char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */ + char path_ipdown[MAXPATHLEN];/* pathname of ip-down script */ ++char path_ipv6up[MAXPATHLEN]; /* pathname of ipv6-up script */ ++char path_ipv6down[MAXPATHLEN];/* pathname of ipv6-down script */ + bool multilink = 0; /* Enable multilink operation */ + char *bundle_name = NULL; /* bundle name for multilink */ + bool dump_options; /* print out option values */ +@@ -290,6 +292,13 @@ option_t general_options[] = { + "Set pathname of ip-down script", + OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, + ++ { "ipv6-up-script", o_string, path_ipup, ++ "Set pathname of ipv6-up script", ++ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, ++ { "ipv6-down-script", o_string, path_ipdown, ++ "Set pathname of ipv6-down script", ++ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, ++ + #ifdef HAVE_MULTILINK + { "multilink", o_bool, &multilink, + "Enable multilink operation", OPT_PRIO | 1 }, +--- a/pppd/ipv6cp.c ++++ b/pppd/ipv6cp.c +@@ -1288,7 +1288,7 @@ ipv6cp_up(f) + */ + if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) { + ipv6cp_script_state = s_up; +- ipv6cp_script(_PATH_IPV6UP); ++ ipv6cp_script(path_ipv6up); + } + } + +@@ -1339,7 +1339,7 @@ ipv6cp_down(f) + /* Execute the ipv6-down script */ + if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) { + ipv6cp_script_state = s_down; +- ipv6cp_script(_PATH_IPV6DOWN); ++ ipv6cp_script(path_ipv6down); + } + } + +@@ -1382,13 +1382,13 @@ ipv6cp_script_done(arg) + case s_up: + if (ipv6cp_fsm[0].state != OPENED) { + ipv6cp_script_state = s_down; +- ipv6cp_script(_PATH_IPV6DOWN); ++ ipv6cp_script(path_ipv6down); + } + break; + case s_down: + if (ipv6cp_fsm[0].state == OPENED) { + ipv6cp_script_state = s_up; +- ipv6cp_script(_PATH_IPV6UP); ++ ipv6cp_script(path_ipv6up); + } + break; + } +--- a/pppd/pppd.h ++++ b/pppd/pppd.h +@@ -315,6 +315,8 @@ extern int max_data_rate; /* max bytes/s + extern int req_unit; /* interface unit number to use */ + extern char path_ipup[MAXPATHLEN]; /* pathname of ip-up script */ + extern char path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */ ++extern char path_ipv6up[MAXPATHLEN]; /* pathname of ipv6-up script */ ++extern char path_ipv6down[MAXPATHLEN]; /* pathname of ipv6-down script */ + extern bool multilink; /* enable multilink operation */ + extern bool noendpoint; /* don't send or accept endpt. discrim. */ + extern char *bundle_name; /* bundle name for multilink */ diff --git a/package/ppp/patches/206-compensate_time_change.patch b/package/ppp/patches/206-compensate_time_change.patch index 4ec488fa47..041ae1f86f 100644 --- a/package/ppp/patches/206-compensate_time_change.patch +++ b/package/ppp/patches/206-compensate_time_change.patch @@ -16,7 +16,7 @@ static void setup_signals __P((void)); static void create_pidfile __P((int pid)); static void create_linkpidfile __P((int pid)); -@@ -533,6 +535,7 @@ main(argc, argv) +@@ -535,6 +537,7 @@ main(argc, argv) info("Starting link"); } @@ -24,7 +24,7 @@ gettimeofday(&start_time, NULL); script_unsetenv("CONNECT_TIME"); script_unsetenv("BYTES_SENT"); -@@ -1265,6 +1268,36 @@ struct callout { +@@ -1267,6 +1270,36 @@ struct callout { static struct callout *callout = NULL; /* Callout list */ static struct timeval timenow; /* Current time */ @@ -61,7 +61,7 @@ /* * timeout - Schedule a timeout. -@@ -1335,6 +1368,8 @@ calltimeout() +@@ -1337,6 +1370,8 @@ calltimeout() { struct callout *p; @@ -70,7 +70,7 @@ while (callout != NULL) { p = callout; -@@ -1362,6 +1397,8 @@ timeleft(tvp) +@@ -1364,6 +1399,8 @@ timeleft(tvp) { if (callout == NULL) return NULL; diff --git a/package/ppp/patches/310-precompile_filter.patch b/package/ppp/patches/310-precompile_filter.patch index cbcdfa3a28..5d2c8f1710 100644 --- a/package/ppp/patches/310-precompile_filter.patch +++ b/package/ppp/patches/310-precompile_filter.patch @@ -35,7 +35,7 @@ /* * There have been 3 or 4 different names for this in libpcap CVS, but * this seems to be what they have settled on... -@@ -160,6 +161,13 @@ static int setlogfile __P((char **)); +@@ -162,6 +163,13 @@ static int setlogfile __P((char **)); static int loadplugin __P((char **)); #endif @@ -49,7 +49,7 @@ #ifdef PPP_FILTER static int setpassfilter __P((char **)); static int setactivefilter __P((char **)); -@@ -317,6 +325,14 @@ option_t general_options[] = { +@@ -326,6 +334,14 @@ option_t general_options[] = { "set filter for active pkts", OPT_PRIO }, #endif @@ -64,7 +64,7 @@ #ifdef MAXOCTETS { "maxoctets", o_int, &maxoctets, "Set connection traffic limit", -@@ -1463,6 +1479,29 @@ callfile(argv) +@@ -1472,6 +1488,29 @@ callfile(argv) return ok; } diff --git a/package/ppp/patches/320-custom_iface_names.patch b/package/ppp/patches/320-custom_iface_names.patch index 542f0a0d28..26e6837532 100644 --- a/package/ppp/patches/320-custom_iface_names.patch +++ b/package/ppp/patches/320-custom_iface_names.patch @@ -1,6 +1,6 @@ --- a/pppd/main.c +++ b/pppd/main.c -@@ -743,8 +743,11 @@ void +@@ -745,8 +745,11 @@ void set_ifunit(iskey) int iskey; { @@ -24,7 +24,7 @@ bool tune_kernel; /* may alter kernel settings */ int connect_delay = 1000; /* wait this many ms after connect script */ int req_unit = -1; /* requested interface unit */ -@@ -264,6 +265,9 @@ option_t general_options[] = { +@@ -266,6 +267,9 @@ option_t general_options[] = { { "linkname", o_string, linkname, "Set logical name for link", OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXPATHLEN }, diff --git a/package/ppp/patches/404-remove_obsolete_protocol_names.patch b/package/ppp/patches/404-remove_obsolete_protocol_names.patch index 13a338f3e6..71b4d97743 100644 --- a/package/ppp/patches/404-remove_obsolete_protocol_names.patch +++ b/package/ppp/patches/404-remove_obsolete_protocol_names.patch @@ -1,6 +1,6 @@ --- a/pppd/main.c +++ b/pppd/main.c -@@ -880,14 +880,17 @@ struct protocol_list { +@@ -882,14 +882,17 @@ struct protocol_list { const char *name; } protocol_list[] = { { 0x21, "IP" }, @@ -18,7 +18,7 @@ { 0x33, "Stream Protocol ST-II" }, { 0x35, "Banyan Vines" }, { 0x39, "AppleTalk EDDP" }, -@@ -901,8 +904,11 @@ struct protocol_list { +@@ -903,8 +906,11 @@ struct protocol_list { { 0x49, "Serial Data Transport Protocol (PPP-SDTP)" }, { 0x4b, "SNA over 802.2" }, { 0x4d, "SNA" }, @@ -30,7 +30,7 @@ { 0x53, "Encryption" }, { 0x55, "Individual Link Encryption" }, { 0x57, "IPv6" }, -@@ -913,12 +919,15 @@ struct protocol_list { +@@ -915,12 +921,15 @@ struct protocol_list { { 0x65, "RTP IPHC Compressed non-TCP" }, { 0x67, "RTP IPHC Compressed UDP 8" }, { 0x69, "RTP IPHC Compressed RTP 8" }, @@ -46,7 +46,7 @@ { 0x0203, "IBM Source Routing BPDU" }, { 0x0205, "DEC LANBridge100 Spanning Tree" }, { 0x0207, "Cisco Discovery Protocol" }, -@@ -930,15 +939,19 @@ struct protocol_list { +@@ -932,15 +941,19 @@ struct protocol_list { { 0x0231, "Luxcom" }, { 0x0233, "Sigma Network Systems" }, { 0x0235, "Apple Client Server Protocol" }, @@ -66,7 +66,7 @@ { 0x4001, "Cray Communications Control Protocol" }, { 0x4003, "CDPD Mobile Network Registration Protocol" }, { 0x4005, "Expand accelerator protocol" }, -@@ -949,8 +962,10 @@ struct protocol_list { +@@ -951,8 +964,10 @@ struct protocol_list { { 0x4023, "RefTek Protocol" }, { 0x4025, "Fibre Channel" }, { 0x4027, "EMIT Protocols" }, @@ -77,7 +77,7 @@ { 0x8023, "OSI Network Layer Control Protocol" }, { 0x8025, "Xerox NS IDP Control Protocol" }, { 0x8027, "DECnet Phase IV Control Protocol" }, -@@ -959,7 +974,9 @@ struct protocol_list { +@@ -961,7 +976,9 @@ struct protocol_list { { 0x8031, "Bridging NCP" }, { 0x8033, "Stream Protocol Control Protocol" }, { 0x8035, "Banyan Vines Control Protocol" }, @@ -87,7 +87,7 @@ { 0x803f, "NETBIOS Framing Control Protocol" }, { 0x8041, "Cisco Systems Control Protocol" }, { 0x8043, "Ascom Timeplex" }, -@@ -968,18 +985,24 @@ struct protocol_list { +@@ -970,18 +987,24 @@ struct protocol_list { { 0x8049, "Serial Data Control Protocol (PPP-SDCP)" }, { 0x804b, "SNA over 802.2 Control Protocol" }, { 0x804d, "SNA Control Protocol" }, @@ -112,7 +112,7 @@ { 0x8207, "Cisco Discovery Protocol Control" }, { 0x8209, "Netcs Twin Routing" }, { 0x820b, "STP - Control Protocol" }, -@@ -988,24 +1011,29 @@ struct protocol_list { +@@ -990,24 +1013,29 @@ struct protocol_list { { 0x8281, "MPLSCP" }, { 0x8285, "IEEE p1284.4 standard - Protocol Control" }, { 0x8287, "ETSI TETRA TNP1 Control Protocol" }, diff --git a/package/ppp/patches/405-no_multilink_option.patch b/package/ppp/patches/405-no_multilink_option.patch index 5c8cfbd061..fc342b72d5 100644 --- a/package/ppp/patches/405-no_multilink_option.patch +++ b/package/ppp/patches/405-no_multilink_option.patch @@ -1,6 +1,6 @@ --- a/pppd/options.c +++ b/pppd/options.c -@@ -309,13 +309,14 @@ option_t general_options[] = { +@@ -318,13 +318,14 @@ option_t general_options[] = { "Enable multilink operation", OPT_PRIOSUB | OPT_ALIAS | 1 }, { "nomultilink", o_bool, &multilink, "Disable multilink operation", OPT_PRIOSUB | 0 }, |