+ /* Publish public IP addresses */
+ if (a->scope == RT_SCOPE_UNIVERSE ||
+ a->scope == RT_SCOPE_SITE)
+ return 1;
+
+ if (a->scope == RT_SCOPE_LINK) {
+
+ /* Publish link local IP addresses if they are the only ones on the link */
+ for (b = a->interface->addresses; b; b = b->address_next) {
+ if (b == a)
+ continue;
+
+ if (b->scope == RT_SCOPE_UNIVERSE ||
+ b->scope == RT_SCOPE_SITE)
+ return 0;
+ }
+
+ return 1;
+ }