diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-09-06 19:50:27 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2021-09-21 17:43:45 -0300 | 
| commit | 242a9767f7bf44b1ec8944ca880962c62d5264b2 (patch) | |
| tree | a5ac6d74aad64962a33026f33cdbcf04aa7cf4b6 /ospf6d/ospf6_nssa.c | |
| parent | e81192ad7c08d85f008c8a400157b69e5a42c2e4 (diff) | |
ospf6d: fix metric type of NSSA Type-7 LSAs
Fix wrong comparison since route->path.metric_type is always set
to either 1 or 2. The OSPF6_PATH_TYPE_EXTERNAL2 constant, whose
value is 4, refers to a route type so its usage was incorrect here.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
| -rw-r--r-- | ospf6d/ospf6_nssa.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index 10b7d2d9f6..89a72bf225 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -1311,7 +1311,7 @@ void ospf6_nssa_lsa_originate(struct ospf6_route *route,  	/* Fill AS-External-LSA */  	/* Metric type */ -	if (route->path.metric_type == OSPF6_PATH_TYPE_EXTERNAL2) +	if (route->path.metric_type == 2)  		SET_FLAG(as_external_lsa->bits_metric, OSPF6_ASBR_BIT_E);  	else  		UNSET_FLAG(as_external_lsa->bits_metric, OSPF6_ASBR_BIT_E);  | 
