DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_DIST_ARGS, "OSPF6 Distribute arguments");
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_REDISTRIBUTE, "OSPF6 Redistribute arguments");
-static void ospf6_asbr_redistribute_set(int type, vrf_id_t vrf_id);
+static void ospf6_asbr_redistribute_set(struct ospf6 *ospf6, int type);
static void ospf6_asbr_redistribute_unset(struct ospf6 *ospf6,
struct ospf6_redist *red, int type);
type));
ospf6_asbr_redistribute_unset(ospf6, red, type);
ospf6_asbr_routemap_set(red, mapname);
- ospf6_asbr_redistribute_set(
- type, ospf6->vrf_id);
+ ospf6_asbr_redistribute_set(ospf6, type);
}
}
}
OSPF6_ROUTER_LSA_SCHEDULE(oa);
}
-static void ospf6_asbr_redistribute_set(int type, vrf_id_t vrf_id)
+static void ospf6_asbr_redistribute_set(struct ospf6 *ospf6, int type)
{
- struct ospf6 *ospf6 = NULL;
- ospf6_zebra_redistribute(type, vrf_id);
-
- ospf6 = ospf6_lookup_by_vrf_id(vrf_id);
-
- if (!ospf6)
- return;
+ ospf6_zebra_redistribute(type, ospf6->vrf_id);
ospf6_asbr_status_update(ospf6, ++ospf6->redist_count);
}
}
ospf6_asbr_routemap_unset(red);
- zlog_debug("%s: redist_count %d", __func__, ospf6->redist_count);
ospf6_asbr_status_update(ospf6, --ospf6->redist_count);
}
return CMD_SUCCESS;
ospf6_asbr_redistribute_unset(ospf6, red, type);
- ospf6_asbr_redistribute_set(type, ospf6->vrf_id);
+ ospf6_asbr_redistribute_set(ospf6, type);
return CMD_SUCCESS;
}
ospf6_asbr_redistribute_unset(ospf6, red, type);
ospf6_asbr_routemap_set(red, argv[idx_word]->arg);
- ospf6_asbr_redistribute_set(type, ospf6->vrf_id);
+ ospf6_asbr_redistribute_set(ospf6, type);
return CMD_SUCCESS;
}