freebsd-ports/net/zebra/files/patch-ospf6d
Munechika SUMIKAWA 3e55fe5c3f Upgrade to 0.93a. It also includes critcal bug fix which OSPFv3 routes
do not install in kernel.

No response from:	maintainer
2002-07-29 14:33:28 +00:00

326 lines
9.8 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -c zebra-0.93a/ospf6d/ChangeLog zebra/ospf6d/ChangeLog
*** ospf6d/ChangeLog Mon Jul 8 22:31:02 2002
--- ospf6d/ChangeLog Fri Jul 19 20:23:52 2002
***************
*** 1,3 ****
--- 1,18 ----
+ 2002-07-14 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
+
+ * ospf6_dbex.c: bug that ospf6d fails to refresh self-originated
+ LSA if he have not the LSA before has been fixed.
+ * ospf6_asbr.c: bug of failing removing ASE LSA when remove
+ message arrived from zebra has been fixed.
+ * version: 0.9.6k
+
+ 2002-07-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
+
+ * ospf6_zebra.c: bug reported [zebra 14642] fixed.
+ The bug was related to the synchronization between zebra
+ and ospf6d. Now synchronization will be correctly done.
+ * version: 0.9.6j
+
2002-07-07 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospf6_lsdb.c: bug fixed in ospf6_lsdb_type_router ().
Only in zebra/ospf6d: Makefile
diff -c zebra-0.93a/ospf6d/ospf6_area.c zebra/ospf6d/ospf6_area.c
*** ospf6d/ospf6_area.c Mon Jul 8 22:31:02 2002
--- ospf6d/ospf6_area.c Sat Jul 13 02:22:41 2002
***************
*** 100,127 ****
void
- ospf6_area_intra_topo_add (struct ospf6_route_req *topo_entry)
- {
- if (topo_entry->route.type == OSPF6_DEST_TYPE_ROUTER)
- {
- if (CHECK_FLAG (topo_entry->path.router_bits, OSPF6_ROUTER_LSA_BIT_B))
- ospf6_abr_abr_entry_add (topo_entry);
- }
- CALL_ADD_HOOK (&intra_topology_hook, topo_entry);
- }
-
- void
- ospf6_area_intra_topo_remove (struct ospf6_route_req *topo_entry)
- {
- if (topo_entry->route.type == OSPF6_DEST_TYPE_ROUTER)
- {
- if (CHECK_FLAG (topo_entry->path.router_bits, OSPF6_ROUTER_LSA_BIT_E))
- ospf6_abr_abr_entry_add (topo_entry);
- }
- CALL_REMOVE_HOOK (&intra_topology_hook, topo_entry);
- }
-
- void
ospf6_area_route_add (void *data)
{
struct ospf6_route_req *route = data;
--- 100,105 ----
diff -c zebra-0.93a/ospf6d/ospf6_asbr.c zebra/ospf6d/ospf6_asbr.c
*** ospf6d/ospf6_asbr.c Mon Jul 8 22:31:02 2002
--- ospf6d/ospf6_asbr.c Fri Jul 19 20:23:52 2002
***************
*** 117,123 ****
struct ospf6_lsa *lsa;
lsa = ospf6_lsdb_lookup_lsdb (htons (OSPF6_LSA_TYPE_AS_EXTERNAL),
! htonl (route->path.origin.id),
ospf6->router_id, ospf6->lsdb);
if (lsa)
ospf6_lsa_premature_aging (lsa);
--- 117,123 ----
struct ospf6_lsa *lsa;
lsa = ospf6_lsdb_lookup_lsdb (htons (OSPF6_LSA_TYPE_AS_EXTERNAL),
! route->path.origin.id,
ospf6->router_id, ospf6->lsdb);
if (lsa)
ospf6_lsa_premature_aging (lsa);
***************
*** 417,422 ****
--- 417,425 ----
struct ospf6_route_req route, *target;
assert (ospf6);
+
+ if (IS_OSPF6_DUMP_ASBR)
+ zlog_info ("ASBR: refresh %s", lsa->str);
target = NULL;
for (ospf6_route_head (&route, ospf6->external_table);
diff -c zebra-0.93a/ospf6d/ospf6_dbex.c zebra/ospf6d/ospf6_dbex.c
*** ospf6d/ospf6_dbex.c Mon Jul 8 22:31:02 2002
--- ospf6d/ospf6_dbex.c Fri Jul 19 20:23:52 2002
***************
*** 361,367 ****
/* (f) */
/* Self Originated LSA, section 13.4 */
if (received->lsa_hdr->lsh_advrtr == ospf6->router_id
! && have && ismore_recent < 0)
{
/* we're going to make new lsa or to flush this LSA. */
if (IS_OSPF6_DUMP_DBEX)
--- 361,367 ----
/* (f) */
/* Self Originated LSA, section 13.4 */
if (received->lsa_hdr->lsh_advrtr == ospf6->router_id
! && (! have || ismore_recent < 0))
{
/* we're going to make new lsa or to flush this LSA. */
if (IS_OSPF6_DUMP_DBEX)
diff -c zebra-0.93a/ospf6d/ospf6_intra.c zebra/ospf6d/ospf6_intra.c
*** ospf6d/ospf6_intra.c Mon Jul 8 22:31:02 2002
--- ospf6d/ospf6_intra.c Sat Jul 13 02:22:41 2002
***************
*** 37,42 ****
--- 37,52 ----
struct ospf6_route_req request;
struct ospf6_area *area;
+ if (IS_OSPF6_DUMP_INTRA)
+ {
+ char buf[64];
+ struct prefix_ls *p_ls;
+ p_ls = (struct prefix_ls *) &topo_entry->route.prefix;
+ inet_ntop (AF_INET, &p_ls->adv_router, buf, sizeof (buf));
+ zlog_info ("INTRA: Calculate [%s] %s and %s",
+ (type == ADD ? "add" : "remove"), lsa->str, buf);
+ }
+
intra_prefix = OSPF6_LSA_HEADER_END (lsa->header);
area = lsa->scope;
***************
*** 198,207 ****
! ospf6_lsdb_is_end (&node);
ospf6_lsdb_next (&node))
{
- if (IS_OSPF6_DUMP_INTRA)
- zlog_info ("INTRA: topology hook: Examining %s (%p)",
- node.lsa->str, node.lsa);
-
if (IS_LSA_MAXAGE (node.lsa))
continue;
--- 208,213 ----
diff -c zebra-0.93a/ospf6d/ospf6_lsa.c zebra/ospf6d/ospf6_lsa.c
*** ospf6d/ospf6_lsa.c Mon Jul 8 22:31:02 2002
--- ospf6d/ospf6_lsa.c Fri Jul 19 20:23:53 2002
***************
*** 775,780 ****
--- 775,781 ----
{
struct ospf6_lsa *lsa;
struct ospf6_lsdb *lsdb = NULL;
+ void (*hook) (struct ospf6_lsa *, struct ospf6_lsa *);
lsa = (struct ospf6_lsa *) THREAD_ARG (thread);
assert (lsa && lsa->lsa_hdr);
***************
*** 804,815 ****
else
assert (0);
! #if 0
! if (lsdb->hook)
! (*lsdb->hook) (lsa, NULL);
! #else /*0*/
! CALL_REMOVE_HOOK (&database_hook, lsa);
! #endif /*0*/
/* do not free LSA, and do nothing about lslists.
wait event (ospf6_lsdb_check_maxage) */
--- 805,815 ----
else
assert (0);
! /* call LSDB hook to re-process LSA */
! hook = ospf6_lsdb_hook[ntohs (lsa->header->type) &
! OSPF6_LSTYPE_CODE_MASK].hook;
! if (hook)
! (*hook) (NULL, lsa);
/* do not free LSA, and do nothing about lslists.
wait event (ospf6_lsdb_check_maxage) */
diff -c zebra-0.93a/ospf6d/ospf6_route.c zebra/ospf6d/ospf6_route.c
*** ospf6d/ospf6_route.c Sun Jul 7 17:12:48 2002
--- ospf6d/ospf6_route.c Wed Jul 10 18:26:56 2002
***************
*** 1013,1018 ****
--- 1013,1022 ----
struct prefix_ls *pl = (struct prefix_ls *) &prefix;
struct route_node *node;
+ u_int route_count = 0;
+ u_int path_count = 0;
+ u_int route_redundant = 0;
+
memset (&prefix, 0, sizeof (struct prefix));
for (i = 0; i < argc; i++)
***************
*** 1101,1114 ****
for (node = route_top (table->table); node; node = route_next (node))
{
! if (! node->info)
continue;
if (detail)
! ospf6_route_show_detail (vty, node->info);
else
! ospf6_route_show (vty, node->info);
}
return CMD_SUCCESS;
}
--- 1105,1129 ----
for (node = route_top (table->table); node; node = route_next (node))
{
! struct ospf6_route_node *route = node->info;
!
! if (! route)
continue;
if (detail)
! ospf6_route_show_detail (vty, route);
else
! ospf6_route_show (vty, route);
!
! route_count++;
! path_count += route->path_list->count;
! if (route->path_list->count > 1)
! route_redundant++;
}
+
+ vty_out (vty, "===========%s", VTY_NEWLINE);
+ vty_out (vty, "Route: %d Path: %d Redundant: %d%s",
+ route_count, path_count, route_redundant, VTY_NEWLINE);
return CMD_SUCCESS;
}
diff -c zebra-0.93a/ospf6d/ospf6_zebra.c zebra/ospf6d/ospf6_zebra.c
*** ospf6d/ospf6_zebra.c Sun Jul 7 17:12:48 2002
--- ospf6d/ospf6_zebra.c Wed Jul 24 15:54:33 2002
***************
*** 433,442 ****
linklist_add (nexthop, nexthop_list);
}
! if (type == REMOVE && nexthop_list->count == 0)
{
! if (! ospf6_route_end (&route))
! ospf6_route_next (&route);
if (! memcmp (&request->route, &route.route,
sizeof (struct ospf6_route)))
{
--- 433,445 ----
linklist_add (nexthop, nexthop_list);
}
! if (type == REMOVE && nexthop_list->count != 0)
! type = ADD;
! else if (type == REMOVE && nexthop_list->count == 0)
{
! if (IS_OSPF6_DUMP_ZEBRA)
! zlog_info ("ZEBRA: all nexthop with the selected path has gone");
!
if (! memcmp (&request->route, &route.route,
sizeof (struct ospf6_route)))
{
***************
*** 444,450 ****
struct ospf6_path seconde_path;
if (IS_OSPF6_DUMP_ZEBRA)
! zlog_info ("ZEBRA: find alternative path to add");
linklist_remove (nexthop, nexthop_list);
XFREE (MTYPE_OSPF6_OTHER, nexthop);
--- 447,453 ----
struct ospf6_path seconde_path;
if (IS_OSPF6_DUMP_ZEBRA)
! zlog_info ("ZEBRA: found alternative path to add");
linklist_remove (nexthop, nexthop_list);
XFREE (MTYPE_OSPF6_OTHER, nexthop);
***************
*** 476,481 ****
--- 479,491 ----
requested route */
if (IS_OSPF6_DUMP_ZEBRA)
zlog_info ("ZEBRA: can't find alternative path, remove");
+
+ if (IS_OSPF6_DUMP_ZEBRA)
+ {
+ zlog_info ("ZEBRA: Debug: walk over the route ?");
+ ospf6_route_log_request ("Debug route", "***", &route);
+ ospf6_route_log_request ("Debug request", "***", request);
+ }
nexthop = XCALLOC (MTYPE_OSPF6_OTHER,
sizeof (struct ospf6_nexthop));
Only in zebra/ospf6d: ospf6_zebra.c.orig
diff -c zebra-0.93a/ospf6d/ospf6d.h zebra/ospf6d/ospf6d.h
*** ospf6d/ospf6d.h Mon Jul 8 22:31:04 2002
--- ospf6d/ospf6d.h Fri Jul 19 20:23:53 2002
***************
*** 74,80 ****
#define HASHVAL 64
#define MAXIOVLIST 1024
! #define OSPF6_DAEMON_VERSION "0.9.6i"
#define AF_LINKSTATE 0xff
--- 74,80 ----
#define HASHVAL 64
#define MAXIOVLIST 1024
! #define OSPF6_DAEMON_VERSION "0.9.6k"
#define AF_LINKSTATE 0xff