Skip to content

nl_l3: also compare prefix length in duplicate route check#490

Open
KanjiMonster wants to merge 1 commit into
mainfrom
jogo_fix_frr_dupe_check
Open

nl_l3: also compare prefix length in duplicate route check#490
KanjiMonster wants to merge 1 commit into
mainfrom
jogo_fix_frr_dupe_check

Conversation

@KanjiMonster

@KanjiMonster KanjiMonster commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

When checking for duplicate routes, we also need to check the prefix lengths, else e.g. a route 10.0.0.0/8 will match with a 10.0.10.0/24 route. This can lead to routes falsely being identified as duplicates and not added or removed as expected.

So switch from nl_addr_cmp_prefix() to nl_addr_cmp() to ensure that different prefix lengths will be treated as different routes.

Fixes: 96e14a8 ("nl_l3: ignore duplicated link routes from FRR")

When checking for duplicate routes, we also need to check the prefix
lengths, else e.g. a route 10.0.0.0/8 will match with a 10.0.10.0/24
route. This can lead to routes falsely being identified as duplicates
and not added or removed as expected.

So switch from nl_addr_cmp_prefix() to nl_addr_cmp() to ensure that
different prefix lengths will be treated as different routes.

Fixes: 96e14a8 ("nl_l3: ignore duplicated link routes from FRR")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant