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

fabricd: add option to treat dummy interfaces as loopback interfaces #18242

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

kaffarell
Copy link
Contributor

@kaffarell kaffarell commented Feb 24, 2025

Add interface status flag for interfaces of type "dummy" 0. Add fabricd option to treat dummy interfaces as loopback interfaces.

This is a (kind of) continuation of #10679.
This patch enables dummy-interfaces to be used as router-id interfaces in openfabric networks. This allows us to have multiple openfabric routers with different router-id's on a single node when using a ip unnumbered setup (interfaces without ip's configured). Previously we were limited by only having a single loopback interface, meaning only a single openfabric router was possible.

@donaldsharp
Copy link
Member

can we separate out the zebra code changes to their own commit? It's a bit of logical code that is needed but not actually part of the fabricd changes. I would prefer that the code is broken up this way to allow for future understanding

Introduce ZEBRA_IF_DUMMY interface flag to identify Linux dummy interfaces [0].
These interfaces behave similarly to loopback interfaces and can be
specially handled by daemons.

[0]: https://github.com/torvalds/linux/blob/master/drivers/net/dummy.c

Signed-off-by: Gabriel Goller <[email protected]>
@kaffarell
Copy link
Contributor Author

done @donaldsharp. Let me know if there is anything else you need.

Copy link
Member

@riw777 riw777 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 ... there's one lint I think might need to be taken care of ...

@riw777
Copy link
Member

riw777 commented Feb 25, 2025

 	frr_preinit(&isisd_di, argc, argv);
 #endif
-	frr_opt_add(
-		"I:", longopts,
-		"  -I, --int_num		Set instance number (label-manager).\n"
-		"      --dummy_as_loopback      Treat dummy interfaces like loopback interfaces.\n");
+	frr_opt_add("I:", longopts,
+		    "  -I, --int_num		Set instance number (label-manager).\n"
+		    "      --dummy_as_loopback      Treat dummy interfaces like loopback interfaces.\n");```

don't know if this needs to be fixed ... not major, just making certain

Enable dummy-interfaces to be used as router-id interfaces in openfabric
networks. This allows multiple openfabric routers with different
router-ids on a single node when using IP unnumbered setup (interfaces
without IPs configured). Previously we were limited by having a single
loopback interface, allowing only one openfabric router per node.

Signed-off-by: Gabriel Goller <[email protected]>
@kaffarell
Copy link
Contributor Author

Thanks for the review @riw777! Fixed the style issue.

@donaldsharp donaldsharp merged commit 594f65d into FRRouting:master Feb 26, 2025
9 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.

3 participants