mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 14:04:32 +00:00
isisd: move and rename the infinity metric constants
Those constants are also useful in contexts other than LDP-IGP Synchronization (e.g. the upcoming LFA work will need them). Move them to a more general header to reflect that. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
6dfb7f5961
commit
35f70ed3f9
@ -429,20 +429,24 @@ void isis_ldp_sync_set_if_metric(struct isis_circuit *circuit, bool run_regen)
|
|||||||
if (circuit->area->newmetric) {
|
if (circuit->area->newmetric) {
|
||||||
ldp_sync_info->metric[0] =
|
ldp_sync_info->metric[0] =
|
||||||
circuit->te_metric[0];
|
circuit->te_metric[0];
|
||||||
circuit->te_metric[0] = LDP_ISIS_LSINFINITY;
|
circuit->te_metric[0] =
|
||||||
|
ISIS_WIDE_METRIC_INFINITY;
|
||||||
} else {
|
} else {
|
||||||
ldp_sync_info->metric[0] = circuit->metric[0];
|
ldp_sync_info->metric[0] = circuit->metric[0];
|
||||||
circuit->metric[0] = LDP_ISIS_LSINFINITY_NL;
|
circuit->metric[0] =
|
||||||
|
ISIS_NARROW_METRIC_INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (circuit->is_type & IS_LEVEL_2) {
|
if (circuit->is_type & IS_LEVEL_2) {
|
||||||
if (circuit->area->newmetric) {
|
if (circuit->area->newmetric) {
|
||||||
ldp_sync_info->metric[1] =
|
ldp_sync_info->metric[1] =
|
||||||
circuit->te_metric[1];
|
circuit->te_metric[1];
|
||||||
circuit->te_metric[1] = LDP_ISIS_LSINFINITY;
|
circuit->te_metric[1] =
|
||||||
|
ISIS_WIDE_METRIC_INFINITY;
|
||||||
} else {
|
} else {
|
||||||
ldp_sync_info->metric[1] = circuit->metric[1];
|
ldp_sync_info->metric[1] = circuit->metric[1];
|
||||||
circuit->metric[1] = LDP_ISIS_LSINFINITY_NL;
|
circuit->metric[1] =
|
||||||
|
ISIS_NARROW_METRIC_INFINITY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
#ifndef _ZEBRA_ISIS_LDP_SYNC_H
|
#ifndef _ZEBRA_ISIS_LDP_SYNC_H
|
||||||
#define _ZEBRA_ISIS_LDP_SYNC_H
|
#define _ZEBRA_ISIS_LDP_SYNC_H
|
||||||
|
|
||||||
#define LDP_ISIS_LSINFINITY 0xFFFFFE /* wide link metric */
|
|
||||||
#define LDP_ISIS_LSINFINITY_NL 62 /* narrow link metric */
|
|
||||||
|
|
||||||
/* Macro to log debug message */
|
/* Macro to log debug message */
|
||||||
#define ils_debug(...) \
|
#define ils_debug(...) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -42,6 +42,9 @@ struct isis_area_address {
|
|||||||
uint8_t len;
|
uint8_t len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define ISIS_WIDE_METRIC_INFINITY 0xFFFFFE
|
||||||
|
#define ISIS_NARROW_METRIC_INFINITY 62
|
||||||
|
|
||||||
struct isis_oldstyle_reach;
|
struct isis_oldstyle_reach;
|
||||||
struct isis_oldstyle_reach {
|
struct isis_oldstyle_reach {
|
||||||
struct isis_oldstyle_reach *next;
|
struct isis_oldstyle_reach *next;
|
||||||
|
Loading…
Reference in New Issue
Block a user