mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Minor bugfix: Summary LSA for aggregated area was always propagated with
metric = 1. Now it's metric of most distant component.
This commit is contained in:
parent
27a1e3ac35
commit
60e04f0413
@ -83,6 +83,7 @@ struct area_net
|
|||||||
struct fib_node fn;
|
struct fib_node fn;
|
||||||
int hidden;
|
int hidden;
|
||||||
int active;
|
int active;
|
||||||
|
u32 metric;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ospf_area_config
|
struct ospf_area_config
|
||||||
|
@ -119,7 +119,10 @@ ri_install(struct proto_ospf *po, ip_addr prefix, int pxlen, int dest,
|
|||||||
old->efn = ipath;
|
old->efn = ipath;
|
||||||
}
|
}
|
||||||
if ((new->type == RTS_OSPF) && (anet = (struct area_net *)fib_route(&oa->net_fib, prefix, pxlen)))
|
if ((new->type == RTS_OSPF) && (anet = (struct area_net *)fib_route(&oa->net_fib, prefix, pxlen)))
|
||||||
|
{
|
||||||
anet->active = 1;
|
anet->active = 1;
|
||||||
|
if (new->metric1 < anet->metric) anet->metric = new->metric1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -585,6 +588,7 @@ ospf_rt_spf(struct proto_ospf *po)
|
|||||||
{
|
{
|
||||||
anet = (struct area_net *) nftmp;
|
anet = (struct area_net *) nftmp;
|
||||||
anet->active = 0;
|
anet->active = 0;
|
||||||
|
anet->metric = LSINFINITY;
|
||||||
}
|
}
|
||||||
FIB_WALK_END;
|
FIB_WALK_END;
|
||||||
ospf_rt_spfa(oa);
|
ospf_rt_spfa(oa);
|
||||||
@ -1046,7 +1050,7 @@ again2:
|
|||||||
if ((oa == po->backbone) && oaa->trcap) fl = 1;
|
if ((oa == po->backbone) && oaa->trcap) fl = 1;
|
||||||
|
|
||||||
if(fl) flush_sum_lsa(oaa, &anet->fn, ORT_NET);
|
if(fl) flush_sum_lsa(oaa, &anet->fn, ORT_NET);
|
||||||
else originate_sum_lsa(oaa, &anet->fn, ORT_NET, 1);
|
else originate_sum_lsa(oaa, &anet->fn, ORT_NET, anet->metric);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FIB_WALK_END;
|
FIB_WALK_END;
|
||||||
|
@ -21,8 +21,8 @@ typedef struct orta
|
|||||||
#define ORTA_ASBR 1
|
#define ORTA_ASBR 1
|
||||||
#define ORTA_ABR 2
|
#define ORTA_ABR 2
|
||||||
struct ospf_area *oa;
|
struct ospf_area *oa;
|
||||||
int metric1;
|
u32 metric1;
|
||||||
int metric2;
|
u32 metric2;
|
||||||
ip_addr nh; /* Next hop */
|
ip_addr nh; /* Next hop */
|
||||||
struct ospf_iface *ifa; /* Outgoing interface */
|
struct ospf_iface *ifa; /* Outgoing interface */
|
||||||
struct top_hash_entry *ar; /* Advertising router */
|
struct top_hash_entry *ar; /* Advertising router */
|
||||||
|
Loading…
Reference in New Issue
Block a user