Existing NEXTHOP_TYPE_IPV4_IFINDEX and NEXTHOP_TYPE_IPV6_IFINDEX
routes allow recursion, but were broken when the route happened
to recursively resolve and the resolution nexthop changed.
This commit fixes this issue. Please note that this issue was
in pre-move of static route handling to it's own daemon as well.
This was some easy low-hanging fruit, so to speak.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
reinstall = false;
for (si = rn->info; si; si = si->next) {
if (si->type != STATIC_IPV4_GATEWAY &&
- si->type != STATIC_IPV6_GATEWAY)
+ si->type != STATIC_IPV4_GATEWAY_IFNAME &&
+ si->type != STATIC_IPV6_GATEWAY &&
+ si->type != STATIC_IPV6_GATEWAY_IFNAME)
continue;
orig = si->nh_valid;
memset(&p, 0, sizeof(p));
switch (si->type) {
- case STATIC_IPV4_GATEWAY_IFNAME:
case STATIC_IFNAME:
case STATIC_BLACKHOLE:
- case STATIC_IPV6_GATEWAY_IFNAME:
return;
case STATIC_IPV4_GATEWAY:
+ case STATIC_IPV4_GATEWAY_IFNAME:
p.family = AF_INET;
p.prefixlen = IPV4_MAX_BITLEN;
p.u.prefix4 = si->addr.ipv4;
break;
case STATIC_IPV6_GATEWAY:
+ case STATIC_IPV6_GATEWAY_IFNAME:
p.family = AF_INET6;
p.prefixlen = IPV6_MAX_BITLEN;
p.u.prefix6 = si->addr.ipv6;