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

bgpdisco: nameservice: mechanism to set main IP of the device is broken #461

Open
spolack opened this issue Dec 22, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@spolack
Copy link
Member

spolack commented Dec 22, 2024

In order to detect the main IP, which is announced as the nodes hostname, there is simple procedure foreseen.

While looping over all Interfaces with their IPs, it stores the first seen IPv4 and IPv6 address. Same applies for Loopback IPs, it stores first seen IPv4 loopback IP and first IPv6 address.

Afterwards, it checks if loopback IPv4/IPv6 is set, if not (because it has no IP configured), it resorts to first IPv4, first IPv6 for configuring the main dns record.

The Loop iterates over a dictionary with IP as key and Devices as value. In case of a Loopback having the same IP as a another interface (which is allowed, as a interface can have the first subnet of the loopback network), it is colliding and leaving loopback or the device other IP/Device combination unconfigured.

The dictionary is produced in get_interfaces_with_ip():

result[split(i.address, '/')[0]] = i.dev;

And the resulting dictionary is consumed in https://github.com/freifunk-berlin/falter-packages/blob/main/packages/bgpdisco/nameservice.uc#L57-L87

@spolack spolack added the bug Something isn't working label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant