Add interface altname support
The linux kernel added interface altnames a few years back: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a56493f0620.
Now each interface can have multiple altnames, and all these names, including the primary ones, must be unique. While the normal interface names are limited to 16 bytes, altnames can be up to 128 bytes long.
This update allows FRR to configure interfaces using these altnames. Zebra uses a red-black tree (RB tree) to store interfaces, which allows for quick lookups using the primary interface name. However, with the addition of altnames, this method isn't sufficient because we now have extra names for each interface.
To handle this, the system first checks for the primary name by quickly traversing the RB tree. If no primary name matches, it then goes through all interfaces one by one to check for matching altnames. This way, we maintain efficiency while support altnames.
Fixes: #6786
One question, though: why can't we use a tree and use a list instead?
No reason really, just didn't think of it. Pushed a new version storing altnames in a rbtree.
Added a interface x and interface <altname of x> topotest. Also removed some character length limitations that prevented interface altnamelongerthan15chars to work with yang.
@kaffarell -> Possible you can attend next weeks tech meeting? It's on tuesdays at 11 am Eastern. I think, in general, that the community would accept something like this but we would like to sit down and make sure we understand what is being proposed as well as having some restrictions on what is being done before proceeding and I don't see a great way to have this done via writing.
@donaldsharp I'd be happy to join, but currently the Slack instance only allows email addresses from specific domains, so I can't create an account. Who would be the correct person to contact about this?
send me an email at [email protected] with an email that you want to connect via slack with. I'll get you in.
Just pushed a new version. As discussed in last weeks tech meeting, I added a configuration flag --enable-transparent-altnames (no hard feelings on the name) which enables or disables the lookup of altnames. I did not put the altname parsing and displaying (in show interface) behind the configuration flag as I think thats not really an issue.
Also split the topotest into two tests, one for showing altnames and one for configuring an interface using altnames (the second one needing the --enable-transparent-altnames flag). Added a short notice in the docs as well.
CI:rerun
The altname lookup topotest fails because we don't build frr with --enable-transparent-altnames in the topotest container. Do you want me to add the option here https://github.com/FRRouting/frr/blob/c01b3ad731790f1f63b122f7318b8a9f49f7447e/tests/topotests/docker/inner/compile_frr.sh#L71 and always run the topotests with altname support or comment out the topotest?
Edit: I just skipped the lookup test for now.
What did we decide on this one?
ci:rerun
This pull request has conflicts, please resolve those before we can evaluate the pull request.