Skip to content

Fixes #1852 - Unmap addresses of a neighbour router when the inter-ro…#1853

Closed
gabordozsa wants to merge 1 commit intoskupperproject:mainfrom
gabordozsa:gabor_unmap_addresses_1852
Closed

Fixes #1852 - Unmap addresses of a neighbour router when the inter-ro…#1853
gabordozsa wants to merge 1 commit intoskupperproject:mainfrom
gabordozsa:gabor_unmap_addresses_1852

Conversation

@gabordozsa
Copy link
Copy Markdown
Collaborator

…uter link is lost.

Fixes #1852

If the inter-router link is lost then likely the neighbour is down. If we unmap all of its addresses then multi-key listeners get a chance to switch to alternative addresses immediately. Otherwise, the addresses get unmapped when the RouterNode is deleted which happens if no hello message is received for a period ofremoteLsMaxAgeSeconds. The default is 60s.

@gabordozsa gabordozsa self-assigned this Feb 27, 2026
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@gabordozsa gabordozsa requested a review from ted-ross February 27, 2026 13:20
Copy link
Copy Markdown
Member

@ted-ross ted-ross left a comment

Choose a reason for hiding this comment

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

As noted in the comment, this change unmaps a former-neighbor router's addresses when the router may still be reachable in the topology.

Furthermore, this doesn't address the general problem from the linked issue. For example, in a three-node network:

A -- B -- C

If the link between A and B is lost, addresses on C will not be unmapped by this PR and will suffer the long delay in notification.

node = self.nodes[node_id]
node.remove_link()
if self.link_state.del_peer(node_id):
node.unmap_all_addresses()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not the right place to do this. The fact that the link has dropped does not mean that the (formerly) peer router has become unreachable. It's possible that the router and all of its addresses are still reachable via a different path.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I understand. My assumption is that the most common reason for the link drop is that the peer router got stopped. This would be an optimisation for that common case.

I also think that this is a low risk change : if the peer is still alive and accessible then the router will ask for the addresses again. But again, this only makes sense if link failures are due to the peer being stopped most of the time.

@gabordozsa
Copy link
Copy Markdown
Collaborator Author

As noted in the comment, this change unmaps a former-neighbor router's addresses when the router may still be reachable in the topology.

Furthermore, this doesn't address the general problem from the linked issue. For example, in a three-node network:

A -- B -- C

If the link between A and B is lost, addresses on C will not be unmapped by this PR and will suffer the long delay in notification.

I see this change as a trade-off: it only covers a peer router. If the router went down then multi-key listeners can switch to alternative addresses fast. If the (former) peer is still up then it will be asked eventually to send the addresses again. The addresses cannot be used in the interim period anyway. Regarding addresses on C, we could try to unmap all addresses from every (not peer) routers which used to be connected via the lost link. However, that may trigger lots of potentially unnecessary traffic if we have a lot of routers and they are still accessible via alternate links.

@gabordozsa
Copy link
Copy Markdown
Collaborator Author

Copying here @ted-ross example that explains why this change would not be correct:
There's a three-node full-mesh with routers A, B, and C.  If the link between A and B is lost, closed, or deleted, both A and B will unmap the addresses of the other router.  Even though everything is still reachable, all of those addresses will have no destinations on A or B.  When a new RA arrives from the still-reachable router, things will recover back to normal, but this may take a significant amount of time (30 seconds +/-).

Proper soluiion is proposed in #1854

Closing.

@gabordozsa gabordozsa closed this Feb 27, 2026
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.

Long address watcher update delay when router link goes down

3 participants