summaryrefslogtreecommitdiffstats
path: root/net/zebra-devel/files/patch-ospf6d
blob: e66cf0e4b7ec60abaebbc3e546cb07a4e963d7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
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
  
OpenPOWER on IntegriCloud