summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-02-20 02:26:45 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-02-20 02:26:45 +0100
commit62e64905b76b88da72c522eac9276a74f60c9592 (patch)
tree8e489665d740f72eb8ed8622e9b012642c6b6ccf /proto/ospf
parentd311368bc58842552e25744a0aae9a09c42cda9f (diff)
Several minor fixes
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/rt.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 74f47810..1b0ac5e9 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -36,11 +36,9 @@ unresolved_vlink(ort *ort)
static inline struct nexthop *
new_nexthop(struct ospf_proto *p, ip_addr gw, struct iface *iface, byte weight)
{
- struct nexthop *nh = lp_alloc(p->nhpool, sizeof(struct nexthop));
- nh->labels = 0;
+ struct nexthop *nh = lp_allocz(p->nhpool, sizeof(struct nexthop));
nh->gw = gw;
nh->iface = iface;
- nh->next = NULL;
nh->weight = weight;
return nh;
}
@@ -1907,7 +1905,6 @@ ort_changed(ort *nf, rta *nr)
(nf->n.metric1 != nf->old_metric1) || (nf->n.metric2 != nf->old_metric2) ||
(nf->n.tag != nf->old_tag) || (nf->n.rid != nf->old_rid) ||
(nr->source != or->source) || (nr->dest != or->dest) ||
- (nr->nh.iface != or->nh.iface) || !ipa_equal(nr->nh.gw, or->nh.gw) ||
!nexthop_same(&(nr->nh), &(or->nh));
}
@@ -1952,11 +1949,10 @@ again1:
.src = p->p.main_source,
.source = nf->n.type,
.scope = SCOPE_UNIVERSE,
+ .dest = RTD_UNICAST,
+ .nh = *(nf->n.nhs),
};
- nexthop_link(&a0, nf->n.nhs);
- a0.dest = RTD_UNICAST;
-
if (reload || ort_changed(nf, &a0))
{
rta *a = rta_lookup(&a0);