Fix Quagga OLSR route redistribution toother protocols Signed-off-by: Vasilis Tsiligi...
[openwrt/svn-archive/archive.git] / net / quagga / patches / 002-quagga_olsr.patch
1 diff -Nur quagga-0.98.6/bgpd/bgp_vty.c quagga-0.98.6-patched/bgpd/bgp_vty.c
2 --- quagga-0.98.6/bgpd/bgp_vty.c 2006-03-30 19:12:25.000000000 +0300
3 +++ quagga-0.98.6-patched/bgpd/bgp_vty.c 2007-04-05 01:26:42.000000000 +0300
4 @@ -7793,7 +7793,9 @@
5 return ZEBRA_ROUTE_STATIC;
6 else if (strncmp (str, "r", 1) == 0)
7 return ZEBRA_ROUTE_RIP;
8 - else if (strncmp (str, "o", 1) == 0)
9 + else if (strncmp (str, "ol", 2) == 0)
10 + return ZEBRA_ROUTE_OLSR;
11 + else if (strncmp (str, "os", 2) == 0)
12 return ZEBRA_ROUTE_OSPF;
13 }
14 if (afi == AFI_IP6)
15 @@ -7806,21 +7808,25 @@
16 return ZEBRA_ROUTE_STATIC;
17 else if (strncmp (str, "r", 1) == 0)
18 return ZEBRA_ROUTE_RIPNG;
19 - else if (strncmp (str, "o", 1) == 0)
20 + else if (strncmp (str, "os", 2) == 0)
21 return ZEBRA_ROUTE_OSPF6;
22 + else if (strncmp (str, "ol", 2) == 0)
23 + return ZEBRA_ROUTE_OLSR;
24 }
25 return 0;
26 }
27
28 DEFUN (bgp_redistribute_ipv4,
29 bgp_redistribute_ipv4_cmd,
30 - "redistribute (connected|kernel|ospf|rip|static)",
31 + "redistribute (connected|kernel|ospf|rip|static|olsr)",
32 "Redistribute information from another routing protocol\n"
33 "Connected\n"
34 "Kernel routes\n"
35 "Open Shurtest Path First (OSPF)\n"
36 "Routing Information Protocol (RIP)\n"
37 - "Static routes\n")
38 + "Static routes\n"
39 + "Optimized Link State Routing (OLSR)\n"
40 + )
41 {
42 int type;
43
44 @@ -7835,13 +7841,14 @@
45
46 DEFUN (bgp_redistribute_ipv4_rmap,
47 bgp_redistribute_ipv4_rmap_cmd,
48 - "redistribute (connected|kernel|ospf|rip|static) route-map WORD",
49 + "redistribute (connected|kernel|ospf|rip|static|olsr) route-map WORD",
50 "Redistribute information from another routing protocol\n"
51 "Connected\n"
52 "Kernel routes\n"
53 "Open Shurtest Path First (OSPF)\n"
54 "Routing Information Protocol (RIP)\n"
55 "Static routes\n"
56 + "Optimized Link State Routing (OLSR)\n"
57 "Route map reference\n"
58 "Pointer to route-map entries\n")
59 {
60 @@ -7860,13 +7867,14 @@
61
62 DEFUN (bgp_redistribute_ipv4_metric,
63 bgp_redistribute_ipv4_metric_cmd,
64 - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
65 + "redistribute (connected|kernel|ospf|rip|static|olsr) metric <0-4294967295>",
66 "Redistribute information from another routing protocol\n"
67 "Connected\n"
68 "Kernel routes\n"
69 "Open Shurtest Path First (OSPF)\n"
70 "Routing Information Protocol (RIP)\n"
71 "Static routes\n"
72 + "Optimized Link State Routing (OLSR)\n"
73 "Metric for redistributed routes\n"
74 "Default metric\n")
75 {
76 @@ -7887,13 +7895,14 @@
77
78 DEFUN (bgp_redistribute_ipv4_rmap_metric,
79 bgp_redistribute_ipv4_rmap_metric_cmd,
80 - "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
81 + "redistribute (connected|kernel|ospf|rip|static|olsr) route-map WORD metric <0-4294967295>",
82 "Redistribute information from another routing protocol\n"
83 "Connected\n"
84 "Kernel routes\n"
85 "Open Shurtest Path First (OSPF)\n"
86 "Routing Information Protocol (RIP)\n"
87 "Static routes\n"
88 + "Optimized Link State Routing (OLSR)\n"
89 "Route map reference\n"
90 "Pointer to route-map entries\n"
91 "Metric for redistributed routes\n"
92 @@ -7917,13 +7926,14 @@
93
94 DEFUN (bgp_redistribute_ipv4_metric_rmap,
95 bgp_redistribute_ipv4_metric_rmap_cmd,
96 - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
97 + "redistribute (connected|kernel|ospf|rip|static|olsr) metric <0-4294967295> route-map WORD",
98 "Redistribute information from another routing protocol\n"
99 "Connected\n"
100 "Kernel routes\n"
101 "Open Shurtest Path First (OSPF)\n"
102 "Routing Information Protocol (RIP)\n"
103 "Static routes\n"
104 + "Optimized Link State Routing (OLSR)\n"
105 "Metric for redistributed routes\n"
106 "Default metric\n"
107 "Route map reference\n"
108 @@ -7947,14 +7957,16 @@
109
110 DEFUN (no_bgp_redistribute_ipv4,
111 no_bgp_redistribute_ipv4_cmd,
112 - "no redistribute (connected|kernel|ospf|rip|static)",
113 + "no redistribute (connected|kernel|ospf|rip|static|olsr)",
114 NO_STR
115 "Redistribute information from another routing protocol\n"
116 "Connected\n"
117 "Kernel routes\n"
118 "Open Shurtest Path First (OSPF)\n"
119 "Routing Information Protocol (RIP)\n"
120 - "Static routes\n")
121 + "Static routes\n"
122 + "Optimized Link State Routing (OLSR)\n"
123 + )
124 {
125 int type;
126
127 @@ -7970,7 +7982,7 @@
128
129 DEFUN (no_bgp_redistribute_ipv4_rmap,
130 no_bgp_redistribute_ipv4_rmap_cmd,
131 - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD",
132 + "no redistribute (connected|kernel|ospf|rip|static|olsr) route-map WORD",
133 NO_STR
134 "Redistribute information from another routing protocol\n"
135 "Connected\n"
136 @@ -7978,6 +7990,7 @@
137 "Open Shurtest Path First (OSPF)\n"
138 "Routing Information Protocol (RIP)\n"
139 "Static routes\n"
140 + "Optimized Link State Routing (OLSR)\n"
141 "Route map reference\n"
142 "Pointer to route-map entries\n")
143 {
144 @@ -7996,7 +8009,7 @@
145
146 DEFUN (no_bgp_redistribute_ipv4_metric,
147 no_bgp_redistribute_ipv4_metric_cmd,
148 - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
149 + "no redistribute (connected|kernel|ospf|rip|static|olsr) metric <0-4294967295>",
150 NO_STR
151 "Redistribute information from another routing protocol\n"
152 "Connected\n"
153 @@ -8004,6 +8017,7 @@
154 "Open Shurtest Path First (OSPF)\n"
155 "Routing Information Protocol (RIP)\n"
156 "Static routes\n"
157 + "Optimized Link State Routing (OLSR)\n"
158 "Metric for redistributed routes\n"
159 "Default metric\n")
160 {
161 @@ -8022,7 +8036,7 @@
162
163 DEFUN (no_bgp_redistribute_ipv4_rmap_metric,
164 no_bgp_redistribute_ipv4_rmap_metric_cmd,
165 - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
166 + "no redistribute (connected|kernel|ospf|rip|static|olsr) route-map WORD metric <0-4294967295>",
167 NO_STR
168 "Redistribute information from another routing protocol\n"
169 "Connected\n"
170 @@ -8030,6 +8044,7 @@
171 "Open Shurtest Path First (OSPF)\n"
172 "Routing Information Protocol (RIP)\n"
173 "Static routes\n"
174 + "Optimized Link State Routing (OLSR)\n"
175 "Route map reference\n"
176 "Pointer to route-map entries\n"
177 "Metric for redistributed routes\n"
178 @@ -8051,7 +8066,7 @@
179
180 ALIAS (no_bgp_redistribute_ipv4_rmap_metric,
181 no_bgp_redistribute_ipv4_metric_rmap_cmd,
182 - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
183 + "no redistribute (connected|kernel|ospf|rip|static|olsr) metric <0-4294967295> route-map WORD",
184 NO_STR
185 "Redistribute information from another routing protocol\n"
186 "Connected\n"
187 @@ -8059,6 +8074,7 @@
188 "Open Shurtest Path First (OSPF)\n"
189 "Routing Information Protocol (RIP)\n"
190 "Static routes\n"
191 + "Optimized Link State Routing (OLSR)\n"
192 "Metric for redistributed routes\n"
193 "Default metric\n"
194 "Route map reference\n"
195 @@ -8067,13 +8083,15 @@
196 #ifdef HAVE_IPV6
197 DEFUN (bgp_redistribute_ipv6,
198 bgp_redistribute_ipv6_cmd,
199 - "redistribute (connected|kernel|ospf6|ripng|static)",
200 + "redistribute (connected|kernel|ospf6|ripng|static|olsr)",
201 "Redistribute information from another routing protocol\n"
202 "Connected\n"
203 "Kernel routes\n"
204 "Open Shurtest Path First (OSPFv3)\n"
205 "Routing Information Protocol (RIPng)\n"
206 - "Static routes\n")
207 + "Static routes\n"
208 + "Optimized Link State Routing (OLSR)\n"
209 + )
210 {
211 int type;
212
213 @@ -8089,13 +8107,14 @@
214
215 DEFUN (bgp_redistribute_ipv6_rmap,
216 bgp_redistribute_ipv6_rmap_cmd,
217 - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
218 + "redistribute (connected|kernel|ospf6|ripng|static|olsr) route-map WORD",
219 "Redistribute information from another routing protocol\n"
220 "Connected\n"
221 "Kernel routes\n"
222 "Open Shurtest Path First (OSPFv3)\n"
223 "Routing Information Protocol (RIPng)\n"
224 "Static routes\n"
225 + "Optimized Link State Routing (OLSR)\n"
226 "Route map reference\n"
227 "Pointer to route-map entries\n")
228 {
229 @@ -8114,13 +8133,14 @@
230
231 DEFUN (bgp_redistribute_ipv6_metric,
232 bgp_redistribute_ipv6_metric_cmd,
233 - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
234 + "redistribute (connected|kernel|ospf6|ripng|static|olsr) metric <0-4294967295>",
235 "Redistribute information from another routing protocol\n"
236 "Connected\n"
237 "Kernel routes\n"
238 "Open Shurtest Path First (OSPFv3)\n"
239 "Routing Information Protocol (RIPng)\n"
240 "Static routes\n"
241 + "Optimized Link State Routing (OLSR)\n"
242 "Metric for redistributed routes\n"
243 "Default metric\n")
244 {
245 @@ -8141,13 +8161,14 @@
246
247 DEFUN (bgp_redistribute_ipv6_rmap_metric,
248 bgp_redistribute_ipv6_rmap_metric_cmd,
249 - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
250 + "redistribute (connected|kernel|ospf6|ripng|static|olsr) route-map WORD metric <0-4294967295>",
251 "Redistribute information from another routing protocol\n"
252 "Connected\n"
253 "Kernel routes\n"
254 "Open Shurtest Path First (OSPFv3)\n"
255 "Routing Information Protocol (RIPng)\n"
256 "Static routes\n"
257 + "Optimized Link State Routing (OLSR)\n"
258 "Route map reference\n"
259 "Pointer to route-map entries\n"
260 "Metric for redistributed routes\n"
261 @@ -8171,13 +8192,14 @@
262
263 DEFUN (bgp_redistribute_ipv6_metric_rmap,
264 bgp_redistribute_ipv6_metric_rmap_cmd,
265 - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
266 + "redistribute (connected|kernel|ospf6|ripng|static|olsr) metric <0-4294967295> route-map WORD",
267 "Redistribute information from another routing protocol\n"
268 "Connected\n"
269 "Kernel routes\n"
270 "Open Shurtest Path First (OSPFv3)\n"
271 "Routing Information Protocol (RIPng)\n"
272 "Static routes\n"
273 + "Optimized Link State Routing (OLSR)\n"
274 "Metric for redistributed routes\n"
275 "Default metric\n"
276 "Route map reference\n"
277 @@ -8201,14 +8223,16 @@
278
279 DEFUN (no_bgp_redistribute_ipv6,
280 no_bgp_redistribute_ipv6_cmd,
281 - "no redistribute (connected|kernel|ospf6|ripng|static)",
282 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr)",
283 NO_STR
284 "Redistribute information from another routing protocol\n"
285 "Connected\n"
286 "Kernel routes\n"
287 "Open Shurtest Path First (OSPFv3)\n"
288 "Routing Information Protocol (RIPng)\n"
289 - "Static routes\n")
290 + "Static routes\n"
291 + "Optimized Link State Routing (OLSR)\n"
292 + )
293 {
294 int type;
295
296 @@ -8224,7 +8248,7 @@
297
298 DEFUN (no_bgp_redistribute_ipv6_rmap,
299 no_bgp_redistribute_ipv6_rmap_cmd,
300 - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
301 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr) route-map WORD",
302 NO_STR
303 "Redistribute information from another routing protocol\n"
304 "Connected\n"
305 @@ -8232,6 +8256,7 @@
306 "Open Shurtest Path First (OSPFv3)\n"
307 "Routing Information Protocol (RIPng)\n"
308 "Static routes\n"
309 + "Optimized Link State Routing (OLSR)\n"
310 "Route map reference\n"
311 "Pointer to route-map entries\n")
312 {
313 @@ -8250,7 +8275,7 @@
314
315 DEFUN (no_bgp_redistribute_ipv6_metric,
316 no_bgp_redistribute_ipv6_metric_cmd,
317 - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
318 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr) metric <0-4294967295>",
319 NO_STR
320 "Redistribute information from another routing protocol\n"
321 "Connected\n"
322 @@ -8258,6 +8283,7 @@
323 "Open Shurtest Path First (OSPFv3)\n"
324 "Routing Information Protocol (RIPng)\n"
325 "Static routes\n"
326 + "Optimized Link State Routing (OLSR)\n"
327 "Metric for redistributed routes\n"
328 "Default metric\n")
329 {
330 @@ -8276,7 +8302,7 @@
331
332 DEFUN (no_bgp_redistribute_ipv6_rmap_metric,
333 no_bgp_redistribute_ipv6_rmap_metric_cmd,
334 - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
335 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr) route-map WORD metric <0-4294967295>",
336 NO_STR
337 "Redistribute information from another routing protocol\n"
338 "Connected\n"
339 @@ -8284,6 +8310,7 @@
340 "Open Shurtest Path First (OSPFv3)\n"
341 "Routing Information Protocol (RIPng)\n"
342 "Static routes\n"
343 + "Optimized Link State Routing (OLSR)\n"
344 "Route map reference\n"
345 "Pointer to route-map entries\n"
346 "Metric for redistributed routes\n"
347 @@ -8305,7 +8332,7 @@
348
349 ALIAS (no_bgp_redistribute_ipv6_rmap_metric,
350 no_bgp_redistribute_ipv6_metric_rmap_cmd,
351 - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
352 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr) metric <0-4294967295> route-map WORD",
353 NO_STR
354 "Redistribute information from another routing protocol\n"
355 "Connected\n"
356 @@ -8313,6 +8340,7 @@
357 "Open Shurtest Path First (OSPFv3)\n"
358 "Routing Information Protocol (RIPng)\n"
359 "Static routes\n"
360 + "Optimized Link State Routing (OLSR)\n"
361 "Metric for redistributed routes\n"
362 "Default metric\n"
363 "Route map reference\n"
364 @@ -8325,7 +8353,7 @@
365 {
366 int i;
367 const char *str[] = { "system", "kernel", "connected", "static", "rip",
368 - "ripng", "ospf", "ospf6", "isis", "bgp"};
369 + "ripng", "ospf", "ospf6", "isis", "bgp", "hsls", "olsr"};
370
371 /* Unicast redistribution only. */
372 if (safi != SAFI_UNICAST)
373 diff -Nur quagga-0.98.6/lib/zebra.h quagga-0.98.6-patched/lib/zebra.h
374 --- quagga-0.98.6/lib/zebra.h 2005-06-15 14:54:18.000000000 +0300
375 +++ quagga-0.98.6-patched/lib/zebra.h 2007-04-05 01:23:59.000000000 +0300
376 @@ -378,7 +378,8 @@
377 #define ZEBRA_ROUTE_ISIS 8
378 #define ZEBRA_ROUTE_BGP 9
379 #define ZEBRA_ROUTE_HSLS 10
380 -#define ZEBRA_ROUTE_MAX 11
381 +#define ZEBRA_ROUTE_OLSR 11
382 +#define ZEBRA_ROUTE_MAX 12
383
384 /* Zebra's family types. */
385 #define ZEBRA_FAMILY_IPV4 1
386 diff -Nur quagga-0.98.6/ospfd/ospf_vty.c quagga-0.98.6-patched/ospfd/ospf_vty.c
387 --- quagga-0.98.6/ospfd/ospf_vty.c 2006-03-30 18:41:20.000000000 +0300
388 +++ quagga-0.98.6-patched/ospfd/ospf_vty.c 2007-04-05 01:23:59.000000000 +0300
389 @@ -108,9 +108,11 @@
390 *source = ZEBRA_ROUTE_RIP;
391 else if (strncmp (str, "b", 1) == 0)
392 *source = ZEBRA_ROUTE_BGP;
393 + else if (strncmp (str, "ol", 2) == 0)
394 + *source = ZEBRA_ROUTE_OLSR;
395 else
396 return 0;
397 -
398 +
399 return 1;
400 }
401
402 @@ -5302,13 +5304,14 @@
403 \f
404 DEFUN (ospf_redistribute_source_metric_type,
405 ospf_redistribute_source_metric_type_routemap_cmd,
406 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2) route-map WORD",
407 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric <0-16777214> metric-type (1|2) route-map WORD",
408 "Redistribute information from another routing protocol\n"
409 "Kernel routes\n"
410 "Connected\n"
411 "Static routes\n"
412 "Routing Information Protocol (RIP)\n"
413 "Border Gateway Protocol (BGP)\n"
414 + "Optimized Link State Routing (OLSR)\n"
415 "Metric for redistributed routes\n"
416 "OSPF default metric\n"
417 "OSPF exterior metric type for redistributed routes\n"
418 @@ -5346,13 +5349,14 @@
419
420 ALIAS (ospf_redistribute_source_metric_type,
421 ospf_redistribute_source_metric_type_cmd,
422 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2)",
423 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric <0-16777214> metric-type (1|2)",
424 "Redistribute information from another routing protocol\n"
425 "Kernel routes\n"
426 "Connected\n"
427 "Static routes\n"
428 "Routing Information Protocol (RIP)\n"
429 "Border Gateway Protocol (BGP)\n"
430 + "Optimized Link State Routing (OLSR)\n"
431 "Metric for redistributed routes\n"
432 "OSPF default metric\n"
433 "OSPF exterior metric type for redistributed routes\n"
434 @@ -5368,18 +5372,20 @@
435 "Static routes\n"
436 "Routing Information Protocol (RIP)\n"
437 "Border Gateway Protocol (BGP)\n"
438 + "Optimized Link State Routing (OLSR)\n"
439 "Metric for redistributed routes\n"
440 "OSPF default metric\n")
441
442 DEFUN (ospf_redistribute_source_type_metric,
443 ospf_redistribute_source_type_metric_routemap_cmd,
444 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD",
445 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric-type (1|2) metric <0-16777214> route-map WORD",
446 "Redistribute information from another routing protocol\n"
447 "Kernel routes\n"
448 "Connected\n"
449 "Static routes\n"
450 "Routing Information Protocol (RIP)\n"
451 "Border Gateway Protocol (BGP)\n"
452 + "Optimized Link State Routing (OLSR)\n"
453 "OSPF exterior metric type for redistributed routes\n"
454 "Set OSPF External Type 1 metrics\n"
455 "Set OSPF External Type 2 metrics\n"
456 @@ -5417,13 +5423,14 @@
457
458 ALIAS (ospf_redistribute_source_type_metric,
459 ospf_redistribute_source_type_metric_cmd,
460 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>",
461 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric-type (1|2) metric <0-16777214>",
462 "Redistribute information from another routing protocol\n"
463 "Kernel routes\n"
464 "Connected\n"
465 "Static routes\n"
466 "Routing Information Protocol (RIP)\n"
467 "Border Gateway Protocol (BGP)\n"
468 + "Optimized Link State Routing (OLSR)\n"
469 "OSPF exterior metric type for redistributed routes\n"
470 "Set OSPF External Type 1 metrics\n"
471 "Set OSPF External Type 2 metrics\n"
472 @@ -5432,7 +5439,7 @@
473
474 ALIAS (ospf_redistribute_source_type_metric,
475 ospf_redistribute_source_type_cmd,
476 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)",
477 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric-type (1|2)",
478 "Redistribute information from another routing protocol\n"
479 "Kernel routes\n"
480 "Connected\n"
481 @@ -5440,28 +5447,31 @@
482 "Routing Information Protocol (RIP)\n"
483 "Border Gateway Protocol (BGP)\n"
484 "OSPF exterior metric type for redistributed routes\n"
485 + "Optimized Link State Routing (OLSR)\n"
486 "Set OSPF External Type 1 metrics\n"
487 "Set OSPF External Type 2 metrics\n")
488
489 ALIAS (ospf_redistribute_source_type_metric,
490 ospf_redistribute_source_cmd,
491 - "redistribute (kernel|connected|static|rip|bgp)",
492 + "redistribute (kernel|connected|static|rip|bgp|olsr)",
493 "Redistribute information from another routing protocol\n"
494 "Kernel routes\n"
495 "Connected\n"
496 "Static routes\n"
497 "Routing Information Protocol (RIP)\n"
498 - "Border Gateway Protocol (BGP)\n")
499 + "Border Gateway Protocol (BGP)\n"
500 + "Optimized Link State Routing (OLSR)\n")
501
502 DEFUN (ospf_redistribute_source_metric_routemap,
503 ospf_redistribute_source_metric_routemap_cmd,
504 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD",
505 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric <0-16777214> route-map WORD",
506 "Redistribute information from another routing protocol\n"
507 "Kernel routes\n"
508 "Connected\n"
509 "Static routes\n"
510 "Routing Information Protocol (RIP)\n"
511 "Border Gateway Protocol (BGP)\n"
512 + "Optimized Link State Routing (OLSR)\n"
513 "Metric for redistributed routes\n"
514 "OSPF default metric\n"
515 "Route map reference\n"
516 @@ -5490,13 +5500,14 @@
517
518 DEFUN (ospf_redistribute_source_type_routemap,
519 ospf_redistribute_source_type_routemap_cmd,
520 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD",
521 + "redistribute (kernel|connected|static|rip|bgp|olsr) metric-type (1|2) route-map WORD",
522 "Redistribute information from another routing protocol\n"
523 "Kernel routes\n"
524 "Connected\n"
525 "Static routes\n"
526 "Routing Information Protocol (RIP)\n"
527 "Border Gateway Protocol (BGP)\n"
528 + "Optimized Link State Routing (OLSR)\n"
529 "OSPF exterior metric type for redistributed routes\n"
530 "Set OSPF External Type 1 metrics\n"
531 "Set OSPF External Type 2 metrics\n"
532 @@ -5526,13 +5537,14 @@
533
534 DEFUN (ospf_redistribute_source_routemap,
535 ospf_redistribute_source_routemap_cmd,
536 - "redistribute (kernel|connected|static|rip|bgp) route-map WORD",
537 + "redistribute (kernel|connected|static|rip|bgp|olsr) route-map WORD",
538 "Redistribute information from another routing protocol\n"
539 "Kernel routes\n"
540 "Connected\n"
541 "Static routes\n"
542 "Routing Information Protocol (RIP)\n"
543 "Border Gateway Protocol (BGP)\n"
544 + "Optimized Link State Routing (OLSR)\n"
545 "Route map reference\n"
546 "Pointer to route-map entries\n")
547 {
548 @@ -5553,14 +5565,16 @@
549
550 DEFUN (no_ospf_redistribute_source,
551 no_ospf_redistribute_source_cmd,
552 - "no redistribute (kernel|connected|static|rip|bgp)",
553 + "no redistribute (kernel|connected|static|rip|bgp|olsr)",
554 NO_STR
555 "Redistribute information from another routing protocol\n"
556 "Kernel routes\n"
557 "Connected\n"
558 "Static routes\n"
559 "Routing Information Protocol (RIP)\n"
560 - "Border Gateway Protocol (BGP)\n")
561 + "Border Gateway Protocol (BGP)\n"
562 + "Optimized Link State Routing (olsr)\n"
563 + )
564 {
565 struct ospf *ospf = vty->index;
566 int source;
567 @@ -5574,7 +5588,7 @@
568
569 DEFUN (ospf_distribute_list_out,
570 ospf_distribute_list_out_cmd,
571 - "distribute-list WORD out (kernel|connected|static|rip|bgp)",
572 + "distribute-list WORD out (kernel|connected|static|rip|bgp|olsr)",
573 "Filter networks in routing updates\n"
574 "Access-list name\n"
575 OUT_STR
576 @@ -5582,7 +5596,8 @@
577 "Connected\n"
578 "Static routes\n"
579 "Routing Information Protocol (RIP)\n"
580 - "Border Gateway Protocol (BGP)\n")
581 + "Border Gateway Protocol (BGP)\n"
582 + "Optimized Link State Routing (OLSR)\n")
583 {
584 struct ospf *ospf = vty->index;
585 int source;
586 @@ -5596,7 +5611,7 @@
587
588 DEFUN (no_ospf_distribute_list_out,
589 no_ospf_distribute_list_out_cmd,
590 - "no distribute-list WORD out (kernel|connected|static|rip|bgp)",
591 + "no distribute-list WORD out (kernel|connected|static|rip|bgp|olsr)",
592 NO_STR
593 "Filter networks in routing updates\n"
594 "Access-list name\n"
595 @@ -5605,7 +5620,8 @@
596 "Connected\n"
597 "Static routes\n"
598 "Routing Information Protocol (RIP)\n"
599 - "Border Gateway Protocol (BGP)\n")
600 + "Border Gateway Protocol (BGP)\n"
601 + "Optimized Link State Routing (OLSR)\n")
602 {
603 struct ospf *ospf = vty->index;
604 int source;
605 @@ -7121,7 +7137,8 @@
606
607 \f
608 const char *distribute_str[] = { "system", "kernel", "connected", "static",
609 - "rip", "ripng", "ospf", "ospf6", "isis", "bgp"};
610 + "rip", "ripng", "ospf", "ospf6", "isis", "bgp",
611 + "hsls","olsr"};
612 int
613 config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf)
614 {
615 diff -Nur quagga-0.98.6/zebra/redistribute.c quagga-0.98.6-patched/zebra/redistribute.c
616 --- quagga-0.98.6/zebra/redistribute.c 2005-06-15 14:54:51.000000000 +0300
617 +++ quagga-0.98.6-patched/zebra/redistribute.c 2007-04-05 01:27:23.000000000 +0300
618 @@ -253,6 +253,7 @@
619 case ZEBRA_ROUTE_OSPF:
620 case ZEBRA_ROUTE_OSPF6:
621 case ZEBRA_ROUTE_BGP:
622 + case ZEBRA_ROUTE_OLSR:
623 if (! client->redist[type])
624 {
625 client->redist[type] = 1;
626 @@ -281,6 +282,7 @@
627 case ZEBRA_ROUTE_OSPF:
628 case ZEBRA_ROUTE_OSPF6:
629 case ZEBRA_ROUTE_BGP:
630 + case ZEBRA_ROUTE_OLSR:
631 client->redist[type] = 0;
632 break;
633 default:
634 diff -Nur quagga-0.98.6/zebra/zebra_vty.c quagga-0.98.6-patched/zebra/zebra_vty.c
635 --- quagga-0.98.6/zebra/zebra_vty.c 2004-12-18 18:03:29.000000000 +0200
636 +++ quagga-0.98.6-patched/zebra/zebra_vty.c 2007-04-05 01:23:59.000000000 +0300
637 @@ -53,6 +53,8 @@
638 return "isis";
639 case ZEBRA_ROUTE_BGP:
640 return "bgp";
641 + case ZEBRA_ROUTE_OLSR:
642 + return "olsr";
643 default:
644 return "unknown";
645 }
646 @@ -84,6 +86,10 @@
647 return 'I';
648 case ZEBRA_ROUTE_BGP:
649 return 'B';
650 + case ZEBRA_ROUTE_HSLS:
651 + return 'H';
652 + case ZEBRA_ROUTE_OLSR:
653 + return 'L';
654 default:
655 return '?';
656 }
657 @@ -755,8 +761,8 @@
658 }
659
660 #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \
661 - "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \
662 - "> - selected route, * - FIB route%s%s"
663 + "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \
664 + "L - OLSR, > - selected route, * - FIB route%s%s"
665
666 DEFUN (show_ip_route,
667 show_ip_route_cmd,
668 @@ -874,7 +880,7 @@
669
670 DEFUN (show_ip_route_protocol,
671 show_ip_route_protocol_cmd,
672 - "show ip route (bgp|connected|isis|kernel|ospf|rip|static)",
673 + "show ip route (bgp|connected|isis|kernel|ospf|rip|olsr|static)",
674 SHOW_STR
675 IP_STR
676 "IP routing table\n"
677 @@ -884,6 +890,7 @@
678 "Kernel\n"
679 "Open Shortest Path First (OSPF)\n"
680 "Routing Information Protocol (RIP)\n"
681 + "Optimized Link State Routing (OLSR)\n"
682 "Static routes\n")
683 {
684 int type;
685 @@ -898,7 +905,7 @@
686 type = ZEBRA_ROUTE_CONNECT;
687 else if (strncmp (argv[0], "k", 1) ==0)
688 type = ZEBRA_ROUTE_KERNEL;
689 - else if (strncmp (argv[0], "o", 1) == 0)
690 + else if (strncmp (argv[0], "os", 2) == 0)
691 type = ZEBRA_ROUTE_OSPF;
692 else if (strncmp (argv[0], "i", 1) == 0)
693 type = ZEBRA_ROUTE_ISIS;
694 @@ -906,6 +913,8 @@
695 type = ZEBRA_ROUTE_RIP;
696 else if (strncmp (argv[0], "s", 1) == 0)
697 type = ZEBRA_ROUTE_STATIC;
698 + else if (strncmp (argv[0], "ol", 2) == 0)
699 + type = ZEBRA_ROUTE_OLSR;
700 else
701 {
702 vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
703 @@ -1732,7 +1741,7 @@
704
705 DEFUN (show_ipv6_route_protocol,
706 show_ipv6_route_protocol_cmd,
707 - "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)",
708 + "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|olsr|static)",
709 SHOW_STR
710 IP_STR
711 "IP routing table\n"
712 @@ -1742,6 +1751,7 @@
713 "Kernel\n"
714 "Open Shortest Path First (OSPFv3)\n"
715 "Routing Information Protocol (RIPng)\n"
716 + "Optimized Link State Routing (olsr)\n"
717 "Static routes\n")
718 {
719 int type;
720 @@ -1756,7 +1766,7 @@
721 type = ZEBRA_ROUTE_CONNECT;
722 else if (strncmp (argv[0], "k", 1) ==0)
723 type = ZEBRA_ROUTE_KERNEL;
724 - else if (strncmp (argv[0], "o", 1) == 0)
725 + else if (strncmp (argv[0], "os", 2) == 0)
726 type = ZEBRA_ROUTE_OSPF6;
727 else if (strncmp (argv[0], "i", 1) == 0)
728 type = ZEBRA_ROUTE_ISIS;
729 @@ -1764,7 +1774,9 @@
730 type = ZEBRA_ROUTE_RIPNG;
731 else if (strncmp (argv[0], "s", 1) == 0)
732 type = ZEBRA_ROUTE_STATIC;
733 - else
734 + else if (strncmp (argv[0], "ol", 2) == 0)
735 + type = ZEBRA_ROUTE_OLSR;
736 + else
737 {
738 vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
739 return CMD_WARNING;