Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ospfd: update ospf_asbr_status when using no_area_nssa command #17134

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

Shbinging
Copy link
Contributor

@Shbinging Shbinging commented Oct 16, 2024

In the processing of nssa, if the number of areas that need to be translated is greater than 0, then abr will be regarded as asbr, and it will be marked (0x3) in the flag of router lsa. When a certain area is set from nssa to a normal area, the areas that need to be translated may be reduced. The asbr should be re-interpreted as abr when the translated area is 0.

CLOSES #17105

@Shbinging
Copy link
Contributor Author

In ospf_abr.c line 434

		/* RFC3101, 3.1:
		 * All NSSA border routers must set the E-bit in the Type-1
		 * router-LSAs
		 * of their directly attached non-stub areas, even when they are
		 * not
		 * translating.
		 */
		if (old_state != area->NSSATranslatorState) {
			if (old_state == OSPF_NSSA_TRANSLATE_DISABLED)
				ospf_asbr_status_update(ospf,
							++ospf->redistribute);
			else if (area->NSSATranslatorState
				 == OSPF_NSSA_TRANSLATE_DISABLED)
				ospf_asbr_status_update(ospf,
							--ospf->redistribute);
		}

The comment does not match the logic of the code. The comment emphasizes the need to set the E-bit, but what the code actually does is to set the flag of the router LSA (mark ABR, ASBR)

Copy link
Collaborator

@aceelindem aceelindem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. See one suggestion.

ospfd/ospfd.c Outdated Show resolved Hide resolved
@Shbinging Shbinging force-pushed the fix_no_area_nssa_command branch from f7835cf to adabd0a Compare October 17, 2024 06:23
@github-actions github-actions bot added the rebase PR needs rebase label Oct 17, 2024
@Shbinging Shbinging force-pushed the fix_no_area_nssa_command branch 5 times, most recently from 0da1225 to 119f595 Compare October 17, 2024 06:33
In the processing of nssa, if the number of areas that need to be translated is greater than 0, then abr will be regarded as asbr, and it will be marked (0x3) in the flag of router lsa. When a certain area is set from nssa to a normal area, the areas that need to be translated may be reduced. The asbr should be re-interpreted as abr when the translated area is 0.

Signed-off-by: Shbinging <[email protected]>
@Shbinging Shbinging force-pushed the fix_no_area_nssa_command branch from 119f595 to 71aa5ab Compare October 17, 2024 06:37
@ton31337 ton31337 merged commit 3f69054 into FRRouting:master Oct 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSPF incorrectly set flag of router lsa when unset nssa area
3 participants