source: freewrt/package/ppp/patches/101-debian_ip-up_option.patch@ 6fc4520e

freewrt_1_0 freewrt_2_0
Last change on this file since 6fc4520e was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.4 KB
  • pppd/ipcp.c

    diff -ruNp ppp-2.4.3.orig/pppd/ipcp.c ppp-2.4.3/pppd/ipcp.c
    old new ipcp_up(f)  
    18461846     */
    18471847    if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
    18481848        ipcp_script_state = s_up;
    1849         ipcp_script(_PATH_IPUP);
     1849        ipcp_script(path_ipup);
    18501850    }
    18511851}
    18521852
    ipcp_down(f)  
    18961896    /* Execute the ip-down script */
    18971897    if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
    18981898        ipcp_script_state = s_down;
    1899         ipcp_script(_PATH_IPDOWN);
     1899        ipcp_script(path_ipdown);
    19001900    }
    19011901}
    19021902
    ipcp_script_done(arg)  
    19501950    case s_up:
    19511951        if (ipcp_fsm[0].state != OPENED) {
    19521952            ipcp_script_state = s_down;
    1953             ipcp_script(_PATH_IPDOWN);
     1953            ipcp_script(path_ipdown);
    19541954        }
    19551955        break;
    19561956    case s_down:
    19571957        if (ipcp_fsm[0].state == OPENED) {
    19581958            ipcp_script_state = s_up;
    1959             ipcp_script(_PATH_IPUP);
     1959            ipcp_script(path_ipup);
    19601960        }
    19611961        break;
    19621962    }
  • pppd/main.c

    diff -ruNp ppp-2.4.3.orig/pppd/main.c ppp-2.4.3/pppd/main.c
    old new main(argc, argv)  
    314314    struct protent *protp;
    315315    char numbuf[16];
    316316
     317    strlcpy(path_ipup, _PATH_IPUP, sizeof(path_ipup));
     318    strlcpy(path_ipdown, _PATH_IPDOWN, sizeof(path_ipdown));
     319
    317320    link_stats_valid = 0;
    318321    new_phase(PHASE_INITIALIZE);
    319322
  • pppd/options.c

    diff -ruNp ppp-2.4.3.orig/pppd/options.c ppp-2.4.3/pppd/options.c
    old new char linkname[MAXPATHLEN]; /* logical na  
    108108bool    tune_kernel;            /* may alter kernel settings */
    109109int     connect_delay = 1000;   /* wait this many ms after connect script */
    110110int     req_unit = -1;          /* requested interface unit */
     111char    path_ipup[MAXPATHLEN];  /* pathname of ip-up script */
     112char    path_ipdown[MAXPATHLEN];/* pathname of ip-down script */
    111113bool    multilink = 0;          /* Enable multilink operation */
    112114char    *bundle_name = NULL;    /* bundle name for multilink */
    113115bool    dump_options;           /* print out option values */
    option_t general_options[] = {  
    276278      "Number of seconds to wait for child processes at exit",
    277279      OPT_PRIO },
    278280
     281    { "ip-up-script", o_string, path_ipup,
     282      "Set pathname of ip-up script",
     283      OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
     284    { "ip-down-script", o_string, path_ipdown,
     285      "Set pathname of ip-down script",
     286      OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
     287
    279288#ifdef HAVE_MULTILINK
    280289    { "multilink", o_bool, &multilink,
    281290      "Enable multilink operation", OPT_PRIO | 1 },
  • pppd/pppd.h

    diff -ruNp ppp-2.4.3.orig/pppd/pppd.h ppp-2.4.3/pppd/pppd.h
    old new extern bool tune_kernel; /* May alter ke  
    312312extern int      connect_delay;  /* Time to delay after connect script */
    313313extern int      max_data_rate;  /* max bytes/sec through charshunt */
    314314extern int      req_unit;       /* interface unit number to use */
     315extern char     path_ipup[MAXPATHLEN]; /* pathname of ip-up script */
     316extern char     path_ipdown[MAXPATHLEN]; /* pathname of ip-down script */
    315317extern bool     multilink;      /* enable multilink operation */
    316318extern bool     noendpoint;     /* don't send or accept endpt. discrim. */
    317319extern char     *bundle_name;   /* bundle name for multilink */
Note: See TracBrowser for help on using the repository browser.