summaryrefslogtreecommitdiff
path: root/proto/static/static.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-06-27 16:51:53 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-06-27 16:57:07 +0200
commit586c1800c447ff099d34889b23647c4733876d9b (patch)
treed2f3feec9aaabeffe2457d994f4c453e1d9e7782 /proto/static/static.c
parent45f28d85818f79790968725a945063228989bae7 (diff)
Nest: Neighbor cache cleanups
Simplify neighbor cache code, fix several minor bugs, and improve handling of ONLINK flag.
Diffstat (limited to 'proto/static/static.c')
-rw-r--r--proto/static/static.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 8dfa6f35..40096c16 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -205,10 +205,9 @@ static_add_rte(struct static_proto *p, struct static_route *r)
for (r2 = r; r2; r2 = r2->mp_next)
{
- n = ipa_nonzero(r2->via) ?
- neigh_find2(&p->p, &r2->via, r2->iface,
- NEF_STICKY | (r2->onlink ? NEF_ONLINK : 0)) :
- neigh_find_iface(&p->p, r2->iface);
+ n = neigh_find(&p->p, r2->via, r2->iface, NEF_STICKY |
+ (r2->onlink ? NEF_ONLINK : 0) |
+ (ipa_zero(r2->via) ? NEF_IFACE : 0));
if (!n)
{