Since ppp.link{up,down} is invoked at the end of IPCP negotiation, if
we need ppp.link{up,down}, we couldn't disable IPCP. Now, if IPCP is disabled, ppp.link{up,down} is invoked at the end of IPV6CP negotiation.
This commit is contained in:
parent
f3dab005a8
commit
11f9e243a2
@ -460,7 +460,22 @@ ipv6cp_LayerUp(struct fsm *fp)
|
||||
log_Printf(LogIPV6CP, "myaddr %s hisaddr = %s\n",
|
||||
tbuff, ncpaddr_ntoa(&ipv6cp->hisaddr));
|
||||
|
||||
/* XXX: Call radius_Account() and system_Select() */
|
||||
/* XXX: Call radius_Account() */
|
||||
|
||||
if (!Enabled(fp->bundle, OPT_IPCP)) {
|
||||
/*
|
||||
* XXX this stuff should really live in the FSM. Our config should
|
||||
* associate executable sections in files with events.
|
||||
*/
|
||||
if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) {
|
||||
if (bundle_GetLabel(fp->bundle)) {
|
||||
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
|
||||
LINKUPFILE, NULL, NULL) < 0)
|
||||
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
|
||||
} else
|
||||
system_Select(fp->bundle, "MYADDR6", LINKUPFILE, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
fp->more.reqs = fp->more.naks = fp->more.rejs = ipv6cp->cfg.fsm.maxreq * 3;
|
||||
log_DisplayPrompts();
|
||||
@ -480,7 +495,22 @@ ipv6cp_LayerDown(struct fsm *fp)
|
||||
snprintf(addr, sizeof addr, "%s", ncpaddr_ntoa(&ipv6cp->myaddr));
|
||||
log_Printf(LogIPV6CP, "%s: LayerDown: %s\n", fp->link->name, addr);
|
||||
|
||||
/* XXX: Call radius_Account() and system_Select() */
|
||||
/* XXX: Call radius_Account() */
|
||||
|
||||
if (!Enabled(fp->bundle, OPT_IPCP)) {
|
||||
/*
|
||||
* XXX this stuff should really live in the FSM. Our config should
|
||||
* associate executable sections in files with events.
|
||||
*/
|
||||
if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) {
|
||||
if (bundle_GetLabel(fp->bundle)) {
|
||||
if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle),
|
||||
LINKDOWNFILE, NULL, NULL) < 0)
|
||||
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
|
||||
} else
|
||||
system_Select(fp->bundle, "MYADDR6", LINKDOWNFILE, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
ipv6cp_Setup(ipv6cp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user