ND proxy support for dynamic interfaces

Dynamic interfaces, such as tunnel and ppp, do not exist
in the kernel until it's fully configured. If nd proxy
is configured on such an interface, the ndppd config for
this interface should be written only when the interface's
fully configured (ie, having a valid ifindex value in apteryx).

The patch ensures that the ndppd config only contains interfaces
that have a valid ifindex. This is done by watching the interface
ifindex node in apteryx and trigger the ndppd config update callback
when ifindex has changed.

To make ndppd not exit when the config file contains an interface
that is not yet created, ndppd is patched to treat fd-bind error
as a valid return code so that the program does not try to
proxy the interface and will continue to run.

Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
This commit is contained in:
Isaac Lee 2016-09-21 14:49:17 +12:00 committed by Scott Parlane
parent 771f9ca29d
commit 8afd356df3

View File

@ -152,7 +152,7 @@ static bool configure(ptr<conf>& cf)
ptr<proxy> pr = proxy::open(*pr_cf); ptr<proxy> pr = proxy::open(*pr_cf);
if (!pr) { if (!pr) {
return false; return true;
} }
if (!(x_cf = pr_cf->find("router"))) if (!(x_cf = pr_cf->find("router")))