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
babeld ubus output contains duplicate keys (was: luci-app-babeld: Missing neighbour) #966
Comments
It's a bug in the JSON output produced by https://github.com/openwrt/routing/blob/master/babeld/src/ubus.c - note the duplicate dictionary key |
Yes. You are right. We could change it to |
Sounds sensible to me! Just make sure to only do that for |
I think it is possible that this still brings some duplicate entries with it. Maybe @jech can say something to it, how we can do the sorting in the best manner? Or how we can arrange the json output so we don't have any duplicate keys. |
Actually, a link-local IP address must not occur twice on an interface. The DAD should exist for this purpose. Alternatively, the whole thing could perhaps be represented as an array? |
Right. Neighbours are indexed by (adress, interface). It is perfectly normal to see the same neighbour on two interfaces: if a router A has two radios tuned at the same frequency, or two Ethernet interfaces connected to a single switch, then it will see all neighbors twice, once over each interface. The protocol is designed to handle this case gracefully. I see two solutions to your problem:
|
Personally, I think the former suggestion is nicer. |
Steps to reproduce:
Actual behavior:
One neighbor is displayed.
Expected behavior:
Two neighbors are displayed as with UBUS binding:
Additional Information:
I have attached a picture.
OpenWrt version information from system
/etc/openwrt_release
Ping on maintainers: @jonnytischbein @PolynomialDivision @aparcar
(I am sorry if I am pinging you and you are not the maintainers, however there is nothing in the files about this and you are in the commit history).
The text was updated successfully, but these errors were encountered: