Now properly exiting if any of the interfaces are not opened rather than silently continuing
This commit is contained in:
parent
2f10118a5c
commit
1a691255e3
15
src/ndppd.cc
15
src/ndppd.cc
@ -150,9 +150,8 @@ static bool configure(ptr<conf>& cf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ptr<proxy> pr = proxy::open(*pr_cf);
|
ptr<proxy> pr = proxy::open(*pr_cf);
|
||||||
|
if (!pr || pr.is_null() == true) {
|
||||||
if (!pr) {
|
return false;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(x_cf = pr_cf->find("router")))
|
if (!(x_cf = pr_cf->find("router")))
|
||||||
@ -189,8 +188,14 @@ static bool configure(ptr<conf>& cf)
|
|||||||
|
|
||||||
address addr(*ru_cf);
|
address addr(*ru_cf);
|
||||||
|
|
||||||
if (x_cf = ru_cf->find("iface")) {
|
if (x_cf = ru_cf->find("iface"))
|
||||||
pr->add_rule(addr, iface::open_ifd(*x_cf));
|
{
|
||||||
|
ptr<iface> ifa = iface::open_ifd(*x_cf);
|
||||||
|
if (!ifa || ifa.is_null() == true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pr->add_rule(addr, ifa);
|
||||||
} else if (ru_cf->find("auto")) {
|
} else if (ru_cf->find("auto")) {
|
||||||
pr->add_rule(addr, true);
|
pr->add_rule(addr, true);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user