mac80211: fix a workqueue compat backport
[openwrt.git] / package / ppp / patches / 120-debian_ipv6_updown_option.patch
1 --- a/pppd/main.c
2 +++ b/pppd/main.c
3 @@ -318,6 +318,8 @@ main(argc, argv)
4  
5      strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
6      strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
7 +    strlcpy(path_ipv6up, _PATH_IPV6UP, sizeof(path_ipv6up));
8 +    strlcpy(path_ipv6down, _PATH_IPV6DOWN, sizeof(path_ipv6down));
9  
10      link_stats_valid = 0;
11      new_phase(PHASE_INITIALIZE);
12 --- a/pppd/options.c
13 +++ b/pppd/options.c
14 @@ -115,6 +115,8 @@ int connect_delay = 1000;   /* wait this m
15  int    req_unit = -1;          /* requested interface unit */
16  char   path_ipup[MAXPATHLEN];  /* pathname of ip-up script */
17  char   path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
18 +char   path_ipv6up[MAXPATHLEN];        /* pathname of ipv6-up script */
19 +char   path_ipv6down[MAXPATHLEN];/* pathname of ipv6-down script */
20  bool   multilink = 0;          /* Enable multilink operation */
21  char   *bundle_name = NULL;    /* bundle name for multilink */
22  bool   dump_options;           /* print out option values */
23 @@ -290,6 +292,13 @@ option_t general_options[] = {
24        "Set pathname of ip-down script",
25        OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
26  
27 +    { "ipv6-up-script", o_string, path_ipup,
28 +      "Set pathname of ipv6-up script",
29 +      OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
30 +    { "ipv6-down-script", o_string, path_ipdown,
31 +      "Set pathname of ipv6-down script",
32 +      OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
33 +
34  #ifdef HAVE_MULTILINK
35      { "multilink", o_bool, &multilink,
36        "Enable multilink operation", OPT_PRIO | 1 },
37 --- a/pppd/ipv6cp.c
38 +++ b/pppd/ipv6cp.c
39 @@ -1288,7 +1288,7 @@ ipv6cp_up(f)
40       */
41      if (ipv6cp_script_state == s_down && ipv6cp_script_pid == 0) {
42         ipv6cp_script_state = s_up;
43 -       ipv6cp_script(_PATH_IPV6UP);
44 +       ipv6cp_script(path_ipv6up);
45      }
46  }
47  
48 @@ -1339,7 +1339,7 @@ ipv6cp_down(f)
49      /* Execute the ipv6-down script */
50      if (ipv6cp_script_state == s_up && ipv6cp_script_pid == 0) {
51         ipv6cp_script_state = s_down;
52 -       ipv6cp_script(_PATH_IPV6DOWN);
53 +       ipv6cp_script(path_ipv6down);
54      }
55  }
56  
57 @@ -1382,13 +1382,13 @@ ipv6cp_script_done(arg)
58      case s_up:
59         if (ipv6cp_fsm[0].state != OPENED) {
60             ipv6cp_script_state = s_down;
61 -           ipv6cp_script(_PATH_IPV6DOWN);
62 +           ipv6cp_script(path_ipv6down);
63         }
64         break;
65      case s_down:
66         if (ipv6cp_fsm[0].state == OPENED) {
67             ipv6cp_script_state = s_up;
68 -           ipv6cp_script(_PATH_IPV6UP);
69 +           ipv6cp_script(path_ipv6up);
70         }
71         break;
72      }
73 --- a/pppd/pppd.h
74 +++ b/pppd/pppd.h
75 @@ -315,6 +315,8 @@ extern int  max_data_rate;  /* max bytes/s
76  extern int     req_unit;       /* interface unit number to use */
77  extern char    path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
78  extern char    path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
79 +extern char    path_ipv6up[MAXPATHLEN]; /* pathname of ipv6-up script */
80 +extern char    path_ipv6down[MAXPATHLEN]; /* pathname of ipv6-down script */
81  extern bool    multilink;      /* enable multilink operation */
82  extern bool    noendpoint;     /* don't send or accept endpt. discrim. */
83  extern char    *bundle_name;   /* bundle name for multilink */