}
if (!sifaddr(u, wo->ouraddr, wo->hisaddr, GetMask(wo->ouraddr)))
return 0;
- ipcp_script(PPP_PATH_IPPREUP, 1);
+ ipcp_script(path_ippreup, 1);
if (!sifup(u))
return 0;
if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
ifindex = if_nametoindex(ifname);
/* run the pre-up script, if any, and wait for it to finish */
- ipcp_script(PPP_PATH_IPPREUP, 1);
+ ipcp_script(path_ippreup, 1);
/* check if preup script renamed the interface */
if (!if_indextoname(ifindex, ifname)) {
strlcpy(path_ipup, PPP_PATH_IPUP, MAXPATHLEN);
strlcpy(path_ipdown, PPP_PATH_IPDOWN, MAXPATHLEN);
+ strlcpy(path_ippreup, PPP_PATH_IPPREUP, MAXPATHLEN);
#ifdef PPP_WITH_IPV6CP
strlcpy(path_ipv6up, PPP_PATH_IPV6UP, MAXPATHLEN);
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_ippreup[MAXPATHLEN]; /* pathname of ip-pre-up script */
char req_ifname[IFNAMSIZ]; /* requested interface name */
bool multilink = 0; /* Enable multilink operation */
char *bundle_name = NULL; /* bundle name for multilink */
{ "ip-down-script", o_string, path_ipdown,
"Set pathname of ip-down script",
OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
+ { "ip-pre-up-script", o_string, path_ippreup,
+ "Set pathname of ip-pre-up script",
+ OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN },
#ifdef PPP_WITH_IPV6CP
{ "ipv6-up-script", o_string, path_ipv6up,
extern int req_unit; /* interface unit number to use */
extern char path_ipup[]; /* pathname of ip-up script */
extern char path_ipdown[]; /* pathname of ip-down script */
+extern char path_ippreup[]; /* pathname of ip-pre-up script */
extern char req_ifname[]; /* interface name to use (IFNAMSIZ) */
extern bool multilink; /* enable multilink operation (options.c) */
extern bool noendpoint; /* don't send or accept endpt. discrim. */