5 This file is part of GNU Zebra.
7 +This file was modified from the original on 30/12/2007
8 +by Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
10 GNU Zebra is free software; you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation; either version 2, or (at your option) any
13 @@ -7793,8 +7796,12 @@ bgp_str2route_type (int afi, const char
14 return ZEBRA_ROUTE_STATIC;
15 else if (strncmp (str, "r", 1) == 0)
16 return ZEBRA_ROUTE_RIP;
17 - else if (strncmp (str, "o", 1) == 0)
18 + else if (strncmp (str, "ol", 2) == 0)
19 + return ZEBRA_ROUTE_OLSR;
20 + else if (strncmp (str, "os", 2) == 0)
21 return ZEBRA_ROUTE_OSPF;
22 + else if (strncmp (str, "ba", 2) == 0)
23 + return ZEBRA_ROUTE_BATMAN;
27 @@ -7806,21 +7813,28 @@ bgp_str2route_type (int afi, const char
28 return ZEBRA_ROUTE_STATIC;
29 else if (strncmp (str, "r", 1) == 0)
30 return ZEBRA_ROUTE_RIPNG;
31 - else if (strncmp (str, "o", 1) == 0)
32 + else if (strncmp (str, "os", 2) == 0)
33 return ZEBRA_ROUTE_OSPF6;
34 + else if (strncmp (str, "ol", 2) == 0)
35 + return ZEBRA_ROUTE_OLSR;
36 + else if (strncmp (str, "ba", 2) == 0)
37 + return ZEBRA_ROUTE_BATMAN;
42 DEFUN (bgp_redistribute_ipv4,
43 bgp_redistribute_ipv4_cmd,
44 - "redistribute (connected|kernel|ospf|rip|static)",
45 + "redistribute (connected|kernel|ospf|rip|static|olsr|batman)",
46 "Redistribute information from another routing protocol\n"
49 "Open Shurtest Path First (OSPF)\n"
50 "Routing Information Protocol (RIP)\n"
53 + "Optimized Link State Routing (OLSR)\n"
54 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
59 @@ -7835,13 +7849,15 @@ DEFUN (bgp_redistribute_ipv4,
61 DEFUN (bgp_redistribute_ipv4_rmap,
62 bgp_redistribute_ipv4_rmap_cmd,
63 - "redistribute (connected|kernel|ospf|rip|static) route-map WORD",
64 + "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD",
65 "Redistribute information from another routing protocol\n"
68 "Open Shurtest Path First (OSPF)\n"
69 "Routing Information Protocol (RIP)\n"
71 + "Optimized Link State Routing (OLSR)\n"
72 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
73 "Route map reference\n"
74 "Pointer to route-map entries\n")
76 @@ -7860,13 +7876,15 @@ DEFUN (bgp_redistribute_ipv4_rmap,
78 DEFUN (bgp_redistribute_ipv4_metric,
79 bgp_redistribute_ipv4_metric_cmd,
80 - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
81 + "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>",
82 "Redistribute information from another routing protocol\n"
85 "Open Shurtest Path First (OSPF)\n"
86 "Routing Information Protocol (RIP)\n"
88 + "Optimized Link State Routing (OLSR)\n"
89 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
90 "Metric for redistributed routes\n"
93 @@ -7887,13 +7905,15 @@ DEFUN (bgp_redistribute_ipv4_metric,
95 DEFUN (bgp_redistribute_ipv4_rmap_metric,
96 bgp_redistribute_ipv4_rmap_metric_cmd,
97 - "redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
98 + "redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>",
99 "Redistribute information from another routing protocol\n"
102 "Open Shurtest Path First (OSPF)\n"
103 "Routing Information Protocol (RIP)\n"
105 + "Optimized Link State Routing (OLSR)\n"
106 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
107 "Route map reference\n"
108 "Pointer to route-map entries\n"
109 "Metric for redistributed routes\n"
110 @@ -7917,13 +7937,15 @@ DEFUN (bgp_redistribute_ipv4_rmap_metric
112 DEFUN (bgp_redistribute_ipv4_metric_rmap,
113 bgp_redistribute_ipv4_metric_rmap_cmd,
114 - "redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
115 + "redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD",
116 "Redistribute information from another routing protocol\n"
119 "Open Shurtest Path First (OSPF)\n"
120 "Routing Information Protocol (RIP)\n"
122 + "Optimized Link State Routing (OLSR)\n"
123 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
124 "Metric for redistributed routes\n"
126 "Route map reference\n"
127 @@ -7947,14 +7969,17 @@ DEFUN (bgp_redistribute_ipv4_metric_rmap
129 DEFUN (no_bgp_redistribute_ipv4,
130 no_bgp_redistribute_ipv4_cmd,
131 - "no redistribute (connected|kernel|ospf|rip|static)",
132 + "no redistribute (connected|kernel|ospf|rip|static|olsr|batman)",
134 "Redistribute information from another routing protocol\n"
137 "Open Shurtest Path First (OSPF)\n"
138 "Routing Information Protocol (RIP)\n"
141 + "Optimized Link State Routing (OLSR)\n"
142 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
147 @@ -7970,7 +7995,7 @@ DEFUN (no_bgp_redistribute_ipv4,
149 DEFUN (no_bgp_redistribute_ipv4_rmap,
150 no_bgp_redistribute_ipv4_rmap_cmd,
151 - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD",
152 + "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD",
154 "Redistribute information from another routing protocol\n"
156 @@ -7978,6 +8003,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap,
157 "Open Shurtest Path First (OSPF)\n"
158 "Routing Information Protocol (RIP)\n"
160 + "Optimized Link State Routing (OLSR)\n"
161 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
162 "Route map reference\n"
163 "Pointer to route-map entries\n")
165 @@ -7996,7 +8023,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap,
167 DEFUN (no_bgp_redistribute_ipv4_metric,
168 no_bgp_redistribute_ipv4_metric_cmd,
169 - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295>",
170 + "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295>",
172 "Redistribute information from another routing protocol\n"
174 @@ -8004,6 +8031,8 @@ DEFUN (no_bgp_redistribute_ipv4_metric,
175 "Open Shurtest Path First (OSPF)\n"
176 "Routing Information Protocol (RIP)\n"
178 + "Optimized Link State Routing (OLSR)\n"
179 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
180 "Metric for redistributed routes\n"
183 @@ -8022,7 +8051,7 @@ DEFUN (no_bgp_redistribute_ipv4_metric,
185 DEFUN (no_bgp_redistribute_ipv4_rmap_metric,
186 no_bgp_redistribute_ipv4_rmap_metric_cmd,
187 - "no redistribute (connected|kernel|ospf|rip|static) route-map WORD metric <0-4294967295>",
188 + "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) route-map WORD metric <0-4294967295>",
190 "Redistribute information from another routing protocol\n"
192 @@ -8030,6 +8059,8 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met
193 "Open Shurtest Path First (OSPF)\n"
194 "Routing Information Protocol (RIP)\n"
196 + "Optimized Link State Routing (OLSR)\n"
197 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
198 "Route map reference\n"
199 "Pointer to route-map entries\n"
200 "Metric for redistributed routes\n"
201 @@ -8051,7 +8082,7 @@ DEFUN (no_bgp_redistribute_ipv4_rmap_met
203 ALIAS (no_bgp_redistribute_ipv4_rmap_metric,
204 no_bgp_redistribute_ipv4_metric_rmap_cmd,
205 - "no redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
206 + "no redistribute (connected|kernel|ospf|rip|static|olsr|batman) metric <0-4294967295> route-map WORD",
208 "Redistribute information from another routing protocol\n"
210 @@ -8059,6 +8090,8 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met
211 "Open Shurtest Path First (OSPF)\n"
212 "Routing Information Protocol (RIP)\n"
214 + "Optimized Link State Routing (OLSR)\n"
215 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
216 "Metric for redistributed routes\n"
218 "Route map reference\n"
219 @@ -8067,13 +8100,16 @@ ALIAS (no_bgp_redistribute_ipv4_rmap_met
221 DEFUN (bgp_redistribute_ipv6,
222 bgp_redistribute_ipv6_cmd,
223 - "redistribute (connected|kernel|ospf6|ripng|static)",
224 + "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)",
225 "Redistribute information from another routing protocol\n"
228 "Open Shurtest Path First (OSPFv3)\n"
229 "Routing Information Protocol (RIPng)\n"
232 + "Optimized Link State Routing (OLSR)\n"
233 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
238 @@ -8089,13 +8125,15 @@ DEFUN (bgp_redistribute_ipv6,
240 DEFUN (bgp_redistribute_ipv6_rmap,
241 bgp_redistribute_ipv6_rmap_cmd,
242 - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
243 + "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD",
244 "Redistribute information from another routing protocol\n"
247 "Open Shurtest Path First (OSPFv3)\n"
248 "Routing Information Protocol (RIPng)\n"
250 + "Optimized Link State Routing (OLSR)\n"
251 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
252 "Route map reference\n"
253 "Pointer to route-map entries\n")
255 @@ -8114,13 +8152,15 @@ DEFUN (bgp_redistribute_ipv6_rmap,
257 DEFUN (bgp_redistribute_ipv6_metric,
258 bgp_redistribute_ipv6_metric_cmd,
259 - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
260 + "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>",
261 "Redistribute information from another routing protocol\n"
264 "Open Shurtest Path First (OSPFv3)\n"
265 "Routing Information Protocol (RIPng)\n"
267 + "Optimized Link State Routing (OLSR)\n"
268 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
269 "Metric for redistributed routes\n"
272 @@ -8141,13 +8181,15 @@ DEFUN (bgp_redistribute_ipv6_metric,
274 DEFUN (bgp_redistribute_ipv6_rmap_metric,
275 bgp_redistribute_ipv6_rmap_metric_cmd,
276 - "redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
277 + "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>",
278 "Redistribute information from another routing protocol\n"
281 "Open Shurtest Path First (OSPFv3)\n"
282 "Routing Information Protocol (RIPng)\n"
284 + "Optimized Link State Routing (OLSR)\n"
285 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
286 "Route map reference\n"
287 "Pointer to route-map entries\n"
288 "Metric for redistributed routes\n"
289 @@ -8171,13 +8213,15 @@ DEFUN (bgp_redistribute_ipv6_rmap_metric
291 DEFUN (bgp_redistribute_ipv6_metric_rmap,
292 bgp_redistribute_ipv6_metric_rmap_cmd,
293 - "redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
294 + "redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD",
295 "Redistribute information from another routing protocol\n"
298 "Open Shurtest Path First (OSPFv3)\n"
299 "Routing Information Protocol (RIPng)\n"
301 + "Optimized Link State Routing (OLSR)\n"
302 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
303 "Metric for redistributed routes\n"
305 "Route map reference\n"
306 @@ -8201,14 +8245,17 @@ DEFUN (bgp_redistribute_ipv6_metric_rmap
308 DEFUN (no_bgp_redistribute_ipv6,
309 no_bgp_redistribute_ipv6_cmd,
310 - "no redistribute (connected|kernel|ospf6|ripng|static)",
311 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman)",
313 "Redistribute information from another routing protocol\n"
316 "Open Shurtest Path First (OSPFv3)\n"
317 "Routing Information Protocol (RIPng)\n"
320 + "Optimized Link State Routing (OLSR)\n"
321 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
326 @@ -8224,7 +8271,7 @@ DEFUN (no_bgp_redistribute_ipv6,
328 DEFUN (no_bgp_redistribute_ipv6_rmap,
329 no_bgp_redistribute_ipv6_rmap_cmd,
330 - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD",
331 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD",
333 "Redistribute information from another routing protocol\n"
335 @@ -8232,6 +8279,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap,
336 "Open Shurtest Path First (OSPFv3)\n"
337 "Routing Information Protocol (RIPng)\n"
339 + "Optimized Link State Routing (OLSR)\n"
340 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
341 "Route map reference\n"
342 "Pointer to route-map entries\n")
344 @@ -8250,7 +8299,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap,
346 DEFUN (no_bgp_redistribute_ipv6_metric,
347 no_bgp_redistribute_ipv6_metric_cmd,
348 - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295>",
349 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295>",
351 "Redistribute information from another routing protocol\n"
353 @@ -8258,6 +8307,8 @@ DEFUN (no_bgp_redistribute_ipv6_metric,
354 "Open Shurtest Path First (OSPFv3)\n"
355 "Routing Information Protocol (RIPng)\n"
357 + "Optimized Link State Routing (OLSR)\n"
358 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
359 "Metric for redistributed routes\n"
362 @@ -8276,7 +8327,7 @@ DEFUN (no_bgp_redistribute_ipv6_metric,
364 DEFUN (no_bgp_redistribute_ipv6_rmap_metric,
365 no_bgp_redistribute_ipv6_rmap_metric_cmd,
366 - "no redistribute (connected|kernel|ospf6|ripng|static) route-map WORD metric <0-4294967295>",
367 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) route-map WORD metric <0-4294967295>",
369 "Redistribute information from another routing protocol\n"
371 @@ -8284,6 +8335,8 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met
372 "Open Shurtest Path First (OSPFv3)\n"
373 "Routing Information Protocol (RIPng)\n"
375 + "Optimized Link State Routing (OLSR)\n"
376 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
377 "Route map reference\n"
378 "Pointer to route-map entries\n"
379 "Metric for redistributed routes\n"
380 @@ -8305,7 +8358,7 @@ DEFUN (no_bgp_redistribute_ipv6_rmap_met
382 ALIAS (no_bgp_redistribute_ipv6_rmap_metric,
383 no_bgp_redistribute_ipv6_metric_rmap_cmd,
384 - "no redistribute (connected|kernel|ospf6|ripng|static) metric <0-4294967295> route-map WORD",
385 + "no redistribute (connected|kernel|ospf6|ripng|static|olsr|batman) metric <0-4294967295> route-map WORD",
387 "Redistribute information from another routing protocol\n"
389 @@ -8313,6 +8366,8 @@ ALIAS (no_bgp_redistribute_ipv6_rmap_met
390 "Open Shurtest Path First (OSPFv3)\n"
391 "Routing Information Protocol (RIPng)\n"
393 + "Optimized Link State Routing (OLSR)\n"
394 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
395 "Metric for redistributed routes\n"
397 "Route map reference\n"
398 @@ -8325,7 +8380,7 @@ bgp_config_write_redistribute (struct vt
401 const char *str[] = { "system", "kernel", "connected", "static", "rip",
402 - "ripng", "ospf", "ospf6", "isis", "bgp"};
403 + "ripng", "ospf", "ospf6", "isis", "bgp", "hsls", "olsr", "batman"};
405 /* Unicast redistribution only. */
406 if (safi != SAFI_UNICAST)
411 This file is part of GNU Zebra.
413 +This file was modified from the original on 30/12/2007
414 +by Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
416 GNU Zebra is free software; you can redistribute it and/or modify it
417 under the terms of the GNU General Public License as published by the
418 Free Software Foundation; either version 2, or (at your option) any
419 @@ -378,7 +381,9 @@ struct in_pktinfo
420 #define ZEBRA_ROUTE_ISIS 8
421 #define ZEBRA_ROUTE_BGP 9
422 #define ZEBRA_ROUTE_HSLS 10
423 -#define ZEBRA_ROUTE_MAX 11
424 +#define ZEBRA_ROUTE_OLSR 11
425 +#define ZEBRA_ROUTE_BATMAN 12
426 +#define ZEBRA_ROUTE_MAX 13
428 /* Zebra's family types. */
429 #define ZEBRA_FAMILY_IPV4 1
430 --- a/ospfd/ospf_vty.c
431 +++ b/ospfd/ospf_vty.c
434 * This file is part of GNU Zebra.
436 + * This file was modified from the original on 30/12/2007
437 + * by Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
439 * GNU Zebra is free software; you can redistribute it and/or modify it
440 * under the terms of the GNU General Public License as published by the
441 * Free Software Foundation; either version 2, or (at your option) any
442 @@ -106,11 +109,15 @@ str2distribute_source (const char *str,
443 *source = ZEBRA_ROUTE_STATIC;
444 else if (strncmp (str, "r", 1) == 0)
445 *source = ZEBRA_ROUTE_RIP;
446 - else if (strncmp (str, "b", 1) == 0)
447 + else if (strncmp (str, "bg", 2) == 0)
448 *source = ZEBRA_ROUTE_BGP;
449 + else if (strncmp (str, "ol", 2) == 0)
450 + *source = ZEBRA_ROUTE_OLSR;
451 + else if (strncmp (str, "ba", 2) == 0)
452 + *source = ZEBRA_ROUTE_BATMAN;
460 @@ -5302,13 +5309,15 @@ ALIAS (no_ip_ospf_transmit_delay,
462 DEFUN (ospf_redistribute_source_metric_type,
463 ospf_redistribute_source_metric_type_routemap_cmd,
464 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2) route-map WORD",
465 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2) route-map WORD",
466 "Redistribute information from another routing protocol\n"
470 "Routing Information Protocol (RIP)\n"
471 "Border Gateway Protocol (BGP)\n"
472 + "Optimized Link State Routing (OLSR)\n"
473 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
474 "Metric for redistributed routes\n"
475 "OSPF default metric\n"
476 "OSPF exterior metric type for redistributed routes\n"
477 @@ -5346,13 +5355,15 @@ DEFUN (ospf_redistribute_source_metric_t
479 ALIAS (ospf_redistribute_source_metric_type,
480 ospf_redistribute_source_metric_type_cmd,
481 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> metric-type (1|2)",
482 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> metric-type (1|2)",
483 "Redistribute information from another routing protocol\n"
487 "Routing Information Protocol (RIP)\n"
488 "Border Gateway Protocol (BGP)\n"
489 + "Optimized Link State Routing (OLSR)\n"
490 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
491 "Metric for redistributed routes\n"
492 "OSPF default metric\n"
493 "OSPF exterior metric type for redistributed routes\n"
494 @@ -5361,25 +5372,29 @@ ALIAS (ospf_redistribute_source_metric_t
496 ALIAS (ospf_redistribute_source_metric_type,
497 ospf_redistribute_source_metric_cmd,
498 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>",
499 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214>",
500 "Redistribute information from another routing protocol\n"
504 "Routing Information Protocol (RIP)\n"
505 "Border Gateway Protocol (BGP)\n"
506 + "Optimized Link State Routing (OLSR)\n"
507 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
508 "Metric for redistributed routes\n"
509 "OSPF default metric\n")
511 DEFUN (ospf_redistribute_source_type_metric,
512 ospf_redistribute_source_type_metric_routemap_cmd,
513 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map WORD",
514 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214> route-map WORD",
515 "Redistribute information from another routing protocol\n"
519 "Routing Information Protocol (RIP)\n"
520 "Border Gateway Protocol (BGP)\n"
521 + "Optimized Link State Routing (OLSR)\n"
522 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
523 "OSPF exterior metric type for redistributed routes\n"
524 "Set OSPF External Type 1 metrics\n"
525 "Set OSPF External Type 2 metrics\n"
526 @@ -5417,13 +5432,15 @@ DEFUN (ospf_redistribute_source_type_met
528 ALIAS (ospf_redistribute_source_type_metric,
529 ospf_redistribute_source_type_metric_cmd,
530 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>",
531 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) metric <0-16777214>",
532 "Redistribute information from another routing protocol\n"
536 "Routing Information Protocol (RIP)\n"
537 "Border Gateway Protocol (BGP)\n"
538 + "Optimized Link State Routing (OLSR)\n"
539 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
540 "OSPF exterior metric type for redistributed routes\n"
541 "Set OSPF External Type 1 metrics\n"
542 "Set OSPF External Type 2 metrics\n"
543 @@ -5432,7 +5449,7 @@ ALIAS (ospf_redistribute_source_type_met
545 ALIAS (ospf_redistribute_source_type_metric,
546 ospf_redistribute_source_type_cmd,
547 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)",
548 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2)",
549 "Redistribute information from another routing protocol\n"
552 @@ -5440,28 +5457,35 @@ ALIAS (ospf_redistribute_source_type_met
553 "Routing Information Protocol (RIP)\n"
554 "Border Gateway Protocol (BGP)\n"
555 "OSPF exterior metric type for redistributed routes\n"
556 + "Optimized Link State Routing (OLSR)\n"
557 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
558 "Set OSPF External Type 1 metrics\n"
559 "Set OSPF External Type 2 metrics\n")
561 ALIAS (ospf_redistribute_source_type_metric,
562 ospf_redistribute_source_cmd,
563 - "redistribute (kernel|connected|static|rip|bgp)",
564 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman)",
565 "Redistribute information from another routing protocol\n"
569 "Routing Information Protocol (RIP)\n"
570 - "Border Gateway Protocol (BGP)\n")
571 + "Border Gateway Protocol (BGP)\n"
572 + "Optimized Link State Routing (OLSR)\n"
573 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
576 DEFUN (ospf_redistribute_source_metric_routemap,
577 ospf_redistribute_source_metric_routemap_cmd,
578 - "redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map WORD",
579 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric <0-16777214> route-map WORD",
580 "Redistribute information from another routing protocol\n"
584 "Routing Information Protocol (RIP)\n"
585 "Border Gateway Protocol (BGP)\n"
586 + "Optimized Link State Routing (OLSR)\n"
587 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
588 "Metric for redistributed routes\n"
589 "OSPF default metric\n"
590 "Route map reference\n"
591 @@ -5490,13 +5514,15 @@ DEFUN (ospf_redistribute_source_metric_r
593 DEFUN (ospf_redistribute_source_type_routemap,
594 ospf_redistribute_source_type_routemap_cmd,
595 - "redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map WORD",
596 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) metric-type (1|2) route-map WORD",
597 "Redistribute information from another routing protocol\n"
601 "Routing Information Protocol (RIP)\n"
602 "Border Gateway Protocol (BGP)\n"
603 + "Optimized Link State Routing (OLSR)\n"
604 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
605 "OSPF exterior metric type for redistributed routes\n"
606 "Set OSPF External Type 1 metrics\n"
607 "Set OSPF External Type 2 metrics\n"
608 @@ -5526,13 +5552,15 @@ DEFUN (ospf_redistribute_source_type_rou
610 DEFUN (ospf_redistribute_source_routemap,
611 ospf_redistribute_source_routemap_cmd,
612 - "redistribute (kernel|connected|static|rip|bgp) route-map WORD",
613 + "redistribute (kernel|connected|static|rip|bgp|olsr|batman) route-map WORD",
614 "Redistribute information from another routing protocol\n"
618 "Routing Information Protocol (RIP)\n"
619 "Border Gateway Protocol (BGP)\n"
620 + "Optimized Link State Routing (OLSR)\n"
621 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
622 "Route map reference\n"
623 "Pointer to route-map entries\n")
625 @@ -5553,14 +5581,17 @@ DEFUN (ospf_redistribute_source_routemap
627 DEFUN (no_ospf_redistribute_source,
628 no_ospf_redistribute_source_cmd,
629 - "no redistribute (kernel|connected|static|rip|bgp)",
630 + "no redistribute (kernel|connected|static|rip|bgp|olsr|batman)",
632 "Redistribute information from another routing protocol\n"
636 "Routing Information Protocol (RIP)\n"
637 - "Border Gateway Protocol (BGP)\n")
638 + "Border Gateway Protocol (BGP)\n"
639 + "Optimized Link State Routing (OLSR)\n"
640 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
643 struct ospf *ospf = vty->index;
645 @@ -5574,7 +5605,7 @@ DEFUN (no_ospf_redistribute_source,
647 DEFUN (ospf_distribute_list_out,
648 ospf_distribute_list_out_cmd,
649 - "distribute-list WORD out (kernel|connected|static|rip|bgp)",
650 + "distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)",
651 "Filter networks in routing updates\n"
654 @@ -5582,7 +5613,10 @@ DEFUN (ospf_distribute_list_out,
657 "Routing Information Protocol (RIP)\n"
658 - "Border Gateway Protocol (BGP)\n")
659 + "Border Gateway Protocol (BGP)\n"
660 + "Optimized Link State Routing (OLSR)\n"
661 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
664 struct ospf *ospf = vty->index;
666 @@ -5596,7 +5630,7 @@ DEFUN (ospf_distribute_list_out,
668 DEFUN (no_ospf_distribute_list_out,
669 no_ospf_distribute_list_out_cmd,
670 - "no distribute-list WORD out (kernel|connected|static|rip|bgp)",
671 + "no distribute-list WORD out (kernel|connected|static|rip|bgp|olsr|batman)",
673 "Filter networks in routing updates\n"
675 @@ -5605,7 +5639,10 @@ DEFUN (no_ospf_distribute_list_out,
678 "Routing Information Protocol (RIP)\n"
679 - "Border Gateway Protocol (BGP)\n")
680 + "Border Gateway Protocol (BGP)\n"
681 + "Optimized Link State Routing (OLSR)\n"
682 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
685 struct ospf *ospf = vty->index;
687 @@ -7121,7 +7158,8 @@ config_write_virtual_link (struct vty *v
690 const char *distribute_str[] = { "system", "kernel", "connected", "static",
691 - "rip", "ripng", "ospf", "ospf6", "isis", "bgp"};
692 + "rip", "ripng", "ospf", "ospf6", "isis", "bgp",
693 + "hsls","olsr","batman"};
695 config_write_ospf_redistribute (struct vty *vty, struct ospf *ospf)
697 --- a/zebra/redistribute.c
698 +++ b/zebra/redistribute.c
701 * This file is part of GNU Zebra.
703 + * This file was modified from the original on 30/12/2007
704 + * by Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
706 * GNU Zebra is free software; you can redistribute it and/or modify it
707 * under the terms of the GNU General Public License as published by the
708 * Free Software Foundation; either version 2, or (at your option) any
709 @@ -253,6 +256,8 @@ zebra_redistribute_add (int command, str
710 case ZEBRA_ROUTE_OSPF:
711 case ZEBRA_ROUTE_OSPF6:
712 case ZEBRA_ROUTE_BGP:
713 + case ZEBRA_ROUTE_OLSR:
714 + case ZEBRA_ROUTE_BATMAN:
715 if (! client->redist[type])
717 client->redist[type] = 1;
718 @@ -281,6 +286,8 @@ zebra_redistribute_delete (int command,
719 case ZEBRA_ROUTE_OSPF:
720 case ZEBRA_ROUTE_OSPF6:
721 case ZEBRA_ROUTE_BGP:
722 + case ZEBRA_ROUTE_OLSR:
723 + case ZEBRA_ROUTE_BATMAN:
724 client->redist[type] = 0;
727 --- a/zebra/zebra_vty.c
728 +++ b/zebra/zebra_vty.c
729 @@ -53,6 +53,10 @@ route_type_str (u_char type)
731 case ZEBRA_ROUTE_BGP:
733 + case ZEBRA_ROUTE_OLSR:
735 + case ZEBRA_ROUTE_BATMAN:
740 @@ -84,6 +88,12 @@ route_type_char (u_char type)
742 case ZEBRA_ROUTE_BGP:
744 + case ZEBRA_ROUTE_HSLS:
746 + case ZEBRA_ROUTE_OLSR:
748 + case ZEBRA_ROUTE_BATMAN:
753 @@ -755,8 +765,8 @@ vty_show_ip_route (struct vty *vty, stru
756 #define SHOW_ROUTE_V4_HEADER "Codes: K - kernel route, C - connected, " \
757 - "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, " \
758 - "> - selected route, * - FIB route%s%s"
759 + "S - static, R - RIP, O - OSPF,%s I - ISIS, B - BGP, H - HSLS, " \
760 + "L - OLSR, M - BATMAN, > - selected route, * - FIB route%s%s"
762 DEFUN (show_ip_route,
764 @@ -874,7 +884,7 @@ DEFUN (show_ip_route_supernets,
766 DEFUN (show_ip_route_protocol,
767 show_ip_route_protocol_cmd,
768 - "show ip route (bgp|connected|isis|kernel|ospf|rip|static)",
769 + "show ip route (bgp|connected|isis|kernel|ospf|rip|olsr|batman|static)",
773 @@ -884,6 +894,8 @@ DEFUN (show_ip_route_protocol,
775 "Open Shortest Path First (OSPF)\n"
776 "Routing Information Protocol (RIP)\n"
777 + "Optimized Link State Routing (OLSR)\n"
778 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
782 @@ -892,13 +904,13 @@ DEFUN (show_ip_route_protocol,
786 - if (strncmp (argv[0], "b", 1) == 0)
787 + if (strncmp (argv[0], "bg", 2) == 0)
788 type = ZEBRA_ROUTE_BGP;
789 else if (strncmp (argv[0], "c", 1) == 0)
790 type = ZEBRA_ROUTE_CONNECT;
791 else if (strncmp (argv[0], "k", 1) ==0)
792 type = ZEBRA_ROUTE_KERNEL;
793 - else if (strncmp (argv[0], "o", 1) == 0)
794 + else if (strncmp (argv[0], "os", 2) == 0)
795 type = ZEBRA_ROUTE_OSPF;
796 else if (strncmp (argv[0], "i", 1) == 0)
797 type = ZEBRA_ROUTE_ISIS;
798 @@ -906,6 +918,10 @@ DEFUN (show_ip_route_protocol,
799 type = ZEBRA_ROUTE_RIP;
800 else if (strncmp (argv[0], "s", 1) == 0)
801 type = ZEBRA_ROUTE_STATIC;
802 + else if (strncmp (argv[0], "ol", 2) == 0)
803 + type = ZEBRA_ROUTE_OLSR;
804 + else if (strncmp (argv[0], "ba", 2) == 0)
805 + type = ZEBRA_ROUTE_BATMAN;
808 vty_out (vty, "Unknown route type%s", VTY_NEWLINE);
809 @@ -1732,7 +1748,7 @@ DEFUN (show_ipv6_route_prefix_longer,
811 DEFUN (show_ipv6_route_protocol,
812 show_ipv6_route_protocol_cmd,
813 - "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|static)",
814 + "show ipv6 route (bgp|connected|isis|kernel|ospf6|ripng|olsr|batman|static)",
818 @@ -1742,6 +1758,8 @@ DEFUN (show_ipv6_route_protocol,
820 "Open Shortest Path First (OSPFv3)\n"
821 "Routing Information Protocol (RIPng)\n"
822 + "Optimized Link State Routing (OLSR)\n"
823 + "Better Approach to Mobile Ad-Hoc Networking (BATMAN)\n"
827 @@ -1750,13 +1768,13 @@ DEFUN (show_ipv6_route_protocol,
831 - if (strncmp (argv[0], "b", 1) == 0)
832 + if (strncmp (argv[0], "bg", 2) == 0)
833 type = ZEBRA_ROUTE_BGP;
834 else if (strncmp (argv[0], "c", 1) == 0)
835 type = ZEBRA_ROUTE_CONNECT;
836 else if (strncmp (argv[0], "k", 1) ==0)
837 type = ZEBRA_ROUTE_KERNEL;
838 - else if (strncmp (argv[0], "o", 1) == 0)
839 + else if (strncmp (argv[0], "os", 2) == 0)
840 type = ZEBRA_ROUTE_OSPF6;
841 else if (strncmp (argv[0], "i", 1) == 0)
842 type = ZEBRA_ROUTE_ISIS;
843 @@ -1764,7 +1782,11 @@ DEFUN (show_ipv6_route_protocol,
844 type = ZEBRA_ROUTE_RIPNG;
845 else if (strncmp (argv[0], "s", 1) == 0)
846 type = ZEBRA_ROUTE_STATIC;
848 + else if (strncmp (argv[0], "ol", 2) == 0)
849 + type = ZEBRA_ROUTE_OLSR;
850 + else if (strncmp (argv[0], "ba", 2) == 0)
851 + type = ZEBRA_ROUTE_BATMAN;
854 vty_out (vty, "Unknown route type%s", VTY_NEWLINE);