interface-ip: use ptp address as well to find local address target
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 17 May 2019 16:27:59 +0000 (18:27 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 17 May 2019 16:38:42 +0000 (18:38 +0200)
commit22e8e589fd6ab5d19dc1d3c9d1bcf2bfabf1fafb
treef82a3910b5f96ee9896332de242c9ffc3a6f2b02
parentf1aa0f9064653110d117fb5be8d8901086236227
interface-ip: use ptp address as well to find local address target

In case of tunnel over PPP(such as gretap over l2tp): tunnel interface
use PPP's peer address as remote address, netifd script will call
proto_add_host_dependency function, then netifd will search which device
can reach to the remote address. Before the patch, netifd don't consider
the PPP interface can reach to the remote address, so netifd will select
default route to remote address, it will lead to remote address unreachable.

Based on a patch by xiaofan <xfan1024@live.com>

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface-ip.c