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