summaryrefslogtreecommitdiff
path: root/proto/static/static.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/static/static.c')
-rw-r--r--proto/static/static.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 28cb1e77..fb547537 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -80,7 +80,6 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa)
{
struct static_route *r2;
struct mpnh *nhs = NULL;
- struct mpnh **nhp = &nhs;
for (r2 = r->mp_next; r2; r2 = r2->mp_next)
if (r2->installed)
@@ -89,9 +88,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa)
nh->gw = r2->via;
nh->iface = r2->neigh->iface;
nh->weight = r2->weight;
- nh->next = NULL;
- *nhp = nh;
- nhp = &(nh->next);
+ mpnh_insert(&nhs, nh);
}
/* There is at least one nexthop */
@@ -107,7 +104,7 @@ static_install(struct proto *p, struct static_route *r, struct iface *ifa)
}
if (r->dest == RTDX_RECURSIVE)
- rta_set_recursive_next_hop(p->main_channel->table, &a, p_igp_table(p), &r->via, &r->via);
+ rta_set_recursive_next_hop(p->main_channel->table, &a, p_igp_table(p), r->via, IPA_NONE);
/* We skip rta_lookup() here */
@@ -247,7 +244,7 @@ static_add(struct proto *p, struct static_config *cf, struct static_route *r)
}
static void
-static_rte_cleanup(struct proto *p, struct static_route *r)
+static_rte_cleanup(struct proto *p UNUSED, struct static_route *r)
{
struct static_route *r2;
@@ -443,7 +440,7 @@ static_if_notify(struct proto *p, unsigned flags, struct iface *i)
}
int
-static_rte_mergable(rte *pri, rte *sec)
+static_rte_mergable(rte *pri UNUSED, rte *sec UNUSED)
{
return 1;
}