Revision 62e64905 proto/ospf/rt.c
proto/ospf/rt.c | ||
---|---|---|
36 | 36 |
static inline struct nexthop * |
37 | 37 |
new_nexthop(struct ospf_proto *p, ip_addr gw, struct iface *iface, byte weight) |
38 | 38 |
{ |
39 |
struct nexthop *nh = lp_alloc(p->nhpool, sizeof(struct nexthop)); |
|
40 |
nh->labels = 0; |
|
39 |
struct nexthop *nh = lp_allocz(p->nhpool, sizeof(struct nexthop)); |
|
41 | 40 |
nh->gw = gw; |
42 | 41 |
nh->iface = iface; |
43 |
nh->next = NULL; |
|
44 | 42 |
nh->weight = weight; |
45 | 43 |
return nh; |
46 | 44 |
} |
... | ... | |
1907 | 1905 |
(nf->n.metric1 != nf->old_metric1) || (nf->n.metric2 != nf->old_metric2) || |
1908 | 1906 |
(nf->n.tag != nf->old_tag) || (nf->n.rid != nf->old_rid) || |
1909 | 1907 |
(nr->source != or->source) || (nr->dest != or->dest) || |
1910 |
(nr->nh.iface != or->nh.iface) || !ipa_equal(nr->nh.gw, or->nh.gw) || |
|
1911 | 1908 |
!nexthop_same(&(nr->nh), &(or->nh)); |
1912 | 1909 |
} |
1913 | 1910 |
|
... | ... | |
1952 | 1949 |
.src = p->p.main_source, |
1953 | 1950 |
.source = nf->n.type, |
1954 | 1951 |
.scope = SCOPE_UNIVERSE, |
1952 |
.dest = RTD_UNICAST, |
|
1953 |
.nh = *(nf->n.nhs), |
|
1955 | 1954 |
}; |
1956 | 1955 |
|
1957 |
nexthop_link(&a0, nf->n.nhs); |
|
1958 |
a0.dest = RTD_UNICAST; |
|
1959 |
|
|
1960 | 1956 |
if (reload || ort_changed(nf, &a0)) |
1961 | 1957 |
{ |
1962 | 1958 |
rta *a = rta_lookup(&a0); |
Also available in: Unified diff