* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
- *
+ *
* GNU Zebra is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "ospfd/ospf_ase.h"
#include "ospfd/ospf_zebra.h"
#include "ospfd/ospf_dump.h"
-\f
+
static struct ospf_area_range *
ospf_area_range_new (struct prefix_ipv4 *p)
{
{
struct ospf_area *area;
struct ospf_area_range *range;
- int ret = OSPF_AREA_ID_FORMAT_ADDRESS;
- area = ospf_area_get (ospf, area_id, ret);
+ area = ospf_area_get (ospf, area_id);
if (area == NULL)
return 0;
{
struct ospf_area *area;
struct ospf_area_range *range;
- int ret = OSPF_AREA_ID_FORMAT_ADDRESS;
- area = ospf_area_get (ospf, area_id, ret);
+ area = ospf_area_get (ospf, area_id);
if (area == NULL)
return 0;
{
struct ospf_area *area;
struct ospf_area_range *range;
- int ret = OSPF_AREA_ID_FORMAT_ADDRESS;
- area = ospf_area_get (ospf, area_id, ret);
+ area = ospf_area_get (ospf, area_id);
range = ospf_area_range_lookup (area, p);
if (range != NULL)
if (new_flags != ospf->flags)
{
- ospf_spf_calculate_schedule (ospf);
+ ospf_spf_calculate_schedule (ospf, SPF_FLAG_ABR_STATUS_CHANGE);
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("ospf_check_abr_status(): new router flags: %x",new_flags);
ospf->flags = new_flags;
zlog_debug ("ospf_abr_translate_nssa(): Could not translate "
"Type-7 for %s to Type-5",
inet_ntoa (lsa->data->id));
- return 1;
+ return 1;
}
}
if (!lsa)
{
- char buf[INET_ADDRSTRLEN + 3]; /* ipv4 and /XX */
+ char buf[PREFIX2STR_BUFFER];
prefix2str ((struct prefix *) p, buf, sizeof(buf));
zlog_warn ("%s: Could not refresh %s to %s",
if (!lsa)
{
- char buf[INET_ADDRSTRLEN + 3]; /* ipv4 and /XX */
+ char buf[PREFIX2STR_BUFFER];
prefix2str ((struct prefix *)p, buf, sizeof(buf));
zlog_warn ("%s: Could not originate %s to %s",
zlog_debug ("ospf_abr_announce_network(): "
"this is intra-area route to %s/%d",
inet_ntoa (p->prefix), p->prefixlen);
- if ((range = ospf_area_range_match (or_area, p))
- && !ospf_area_is_transit (area))
- ospf_abr_update_aggregate (range, or, area);
- else
- ospf_abr_announce_network_to_area (p, or->cost, area);
+ if ((range = ospf_area_range_match (or_area, p))
+ && !ospf_area_is_transit (area))
+ ospf_abr_update_aggregate (range, or, area);
+ else
+ ospf_abr_announce_network_to_area (p, or->cost, area);
}
}
}
lsa = ospf_summary_asbr_lsa_originate (p, cost, area);
if (!lsa)
{
- char buf[INET_ADDRSTRLEN + 3]; /* ipv4 and /XX */
+ char buf[PREFIX2STR_BUFFER];
prefix2str ((struct prefix *)p, buf, sizeof(buf));
zlog_warn ("%s: Could not refresh/originate %s to %s",
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("Scheduling ABR task");
- if (ospf->t_abr_task == NULL)
- ospf->t_abr_task = thread_add_timer (master, ospf_abr_task_timer,
- ospf, OSPF_ABR_TASK_DELAY);
+ thread_add_timer(master, ospf_abr_task_timer, ospf, OSPF_ABR_TASK_DELAY,
+ &ospf->t_abr_task);
}