Closed dolikdev closed 2 years ago
Well, since the original authors of the code are not available, I cannot be sure how it was supposed to work, but what I see in the code is:
/* Set address for this area */
if (area->zone != -1)
cf_set_zone(area->zone);
if (area->addr.zone != -1)
cf_set_curr(&area->addr);
It means, that if the area has -z in areas.bbs, it sets zone's aka (and in the log it does: Select Z2 AKA: 2:463/1331.0 Uplink: 0:0/0.0
). But then if there would be -a there as well, it would try to run the best aka logic from cf_set_curr()
Regarding the circular path itself, you see it adds 2:463/1331 (Path : 2:463/0 2:463/1331
) due to described AKA selection above. And since 2:463/0 is own AKA it is detected as circular.
I should spend some time to understand the original ideas behind it :)
BTW, 'best aka' does not look suitable for the address selection, it's supposed to be used to select own AKA for a destination, here the source is under consideration. Wouldn't you agree?
Verified with ftntoss - a
and indeed it works as expected, but as you correctly said in your last comment, this feature intended for destination, not a source.
Looks like I have misunderstood the use case, thanks again.
BEST_AKA feature works as expected, some documentation improvement may be considered in the future.
Well, I still think there is a room for improvement here. Adding own AKA to the PATH does not look really correct for me. At least AKA from the same zone. I just do not want to break something I'm missing, it's pretty fragile (from the experience :)
System is configured with 2 AKAs in the same network: 2:463/1331 & 2:463/0 and BEST_AKA option is enabled during fidogate build time. EchoMail packet is created like this:
debug shows best AKA works:
However, when
runinc
and thenftntoss
processes the packet, it's being discarded due to circular path:This will work, if I change order of addresses so 2:463/0 will come as first & default AKA. However, then failures will appear for packets made with 2nd AKA.