From 8afd356df3d9a96d3d4ea5dd33a8a1eea08c9ac0 Mon Sep 17 00:00:00 2001 From: Isaac Lee Date: Wed, 21 Sep 2016 14:49:17 +1200 Subject: [PATCH] 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 --- src/ndppd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ndppd.cc b/src/ndppd.cc index bec9656..8642759 100644 --- a/src/ndppd.cc +++ b/src/ndppd.cc @@ -152,7 +152,7 @@ static bool configure(ptr& cf) ptr pr = proxy::open(*pr_cf); if (!pr) { - return false; + return true; } if (!(x_cf = pr_cf->find("router")))