in the peer structure so that it can be used in setting the link-local nexthop
in updates. This would ensure that in the absence of a global IPv6 address on
the peering interface, a route-map can be used to specify a potentially
arbitrary global v6 nexthop and that would be sent in conjunction with the
correct link-local nexthop.
/* If there is no global address. Set link-local address as
global. I know this break RFC specification... */
+ /* In this scenario, the expectation for interop is that the
+ * network admin would use a route-map to specify the global
+ * IPv6 nexthop.
+ */
if (!ret)
memcpy (&nexthop->v6_global, &local->sin6.sin6_addr,
IPV6_MAX_BYTELEN);
- else
- memcpy (&nexthop->v6_local, &local->sin6.sin6_addr,
- IPV6_MAX_BYTELEN);
+ /* Always set the link-local address */
+ memcpy (&nexthop->v6_local, &local->sin6.sin6_addr,
+ IPV6_MAX_BYTELEN);
}
}