mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:06:51 +00:00
Merge pull request #1197 from chiragshah6/ospfv3_dev
ospf6d: OSPFv3 interface bandwidth handling
This commit is contained in:
commit
5287239750
@ -117,8 +117,17 @@ static u_int32_t ospf6_interface_get_cost(struct ospf6_interface *oi)
|
|||||||
u_int32_t cost;
|
u_int32_t cost;
|
||||||
u_int32_t bw, refbw;
|
u_int32_t bw, refbw;
|
||||||
|
|
||||||
bw = oi->interface->bandwidth ? oi->interface->bandwidth
|
/* interface speed and bw can be 0 in some platforms,
|
||||||
: OSPF6_INTERFACE_BANDWIDTH;
|
* use ospf default bw. If bw is configured then it would
|
||||||
|
* be used.
|
||||||
|
*/
|
||||||
|
if (!oi->interface->bandwidth && oi->interface->speed) {
|
||||||
|
bw = oi->interface->speed;
|
||||||
|
} else {
|
||||||
|
bw = oi->interface->bandwidth ? oi->interface->bandwidth
|
||||||
|
: OSPF6_INTERFACE_BANDWIDTH;
|
||||||
|
}
|
||||||
|
|
||||||
refbw = ospf6 ? ospf6->ref_bandwidth : OSPF6_REFERENCE_BANDWIDTH;
|
refbw = ospf6 ? ospf6->ref_bandwidth : OSPF6_REFERENCE_BANDWIDTH;
|
||||||
|
|
||||||
/* A specifed ip ospf cost overrides a calculated one. */
|
/* A specifed ip ospf cost overrides a calculated one. */
|
||||||
|
Loading…
Reference in New Issue
Block a user