1 // SPDX-License-Identifier: MIT
3 Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
11 #include "distribute.h"
15 #include "lib_errors.h"
19 #include "babel_main.h"
24 #include "babel_interface.h"
25 #include "neighbour.h"
29 #include "babel_filter.h"
30 #include "babel_zebra.h"
31 #include "babel_errors.h"
33 #ifndef VTYSH_EXTRACT_PL
34 #include "babeld/babeld_clippy.c"
37 DEFINE_MGROUP(BABELD
, "babeld");
38 DEFINE_MTYPE_STATIC(BABELD
, BABEL
, "Babel Structure");
40 static void babel_init_routing_process(struct event
*thread
);
41 static void babel_get_myid(void);
42 static void babel_initial_noise(void);
43 static void babel_read_protocol(struct event
*thread
);
44 static void babel_main_loop(struct event
*thread
);
45 static void babel_set_timer(struct timeval
*timeout
);
46 static void babel_fill_with_next_timeout(struct timeval
*tv
);
48 babel_distribute_update (struct distribute_ctx
*ctx
, struct distribute
*dist
);
50 /* Informations relative to the babel running daemon. */
51 static struct babel
*babel_routing_process
= NULL
;
52 static unsigned char *receive_buffer
= NULL
;
53 static int receive_buffer_size
= 0;
56 struct timeval check_neighbours_timeout
;
57 static time_t expiry_time
;
58 static time_t source_expiry_time
;
60 /* Babel node structure. */
61 static int babel_config_write (struct vty
*vty
);
62 static struct cmd_node cmd_babel_node
=
66 .parent_node
= CONFIG_NODE
,
67 .prompt
= "%s(config-router)# ",
68 .config_write
= babel_config_write
,
71 /* print current babel configuration on vty */
73 babel_config_write (struct vty
*vty
)
79 /* list enabled debug modes */
80 lines
+= debug_babel_config_write (vty
);
82 if (!babel_routing_process
)
84 vty_out (vty
, "router babel\n");
85 if (diversity_kind
!= DIVERSITY_NONE
)
87 vty_out (vty
, " babel diversity\n");
90 if (diversity_factor
!= BABEL_DEFAULT_DIVERSITY_FACTOR
)
92 vty_out (vty
, " babel diversity-factor %d\n",diversity_factor
);
95 if (resend_delay
!= BABEL_DEFAULT_RESEND_DELAY
)
97 vty_out (vty
, " babel resend-delay %u\n", resend_delay
);
100 if (smoothing_half_life
!= BABEL_DEFAULT_SMOOTHING_HALF_LIFE
)
102 vty_out (vty
, " babel smoothing-half-life %u\n",
103 smoothing_half_life
);
106 /* list enabled interfaces */
107 lines
= 1 + babel_enable_if_config_write (vty
);
108 /* list redistributed protocols */
109 for (afi
= AFI_IP
; afi
<= AFI_IP6
; afi
++) {
110 for (i
= 0; i
< ZEBRA_ROUTE_MAX
; i
++) {
111 if (i
!= zclient
->redist_default
&&
112 vrf_bitmap_check (zclient
->redist
[afi
][i
], VRF_DEFAULT
)) {
113 vty_out (vty
, " redistribute %s %s\n",
114 (afi
== AFI_IP
) ? "ipv4" : "ipv6",
115 zebra_route_string(i
));
121 lines
+= config_write_distribute (vty
, babel_routing_process
->distribute_ctx
);
123 vty_out (vty
, "exit\n");
130 babel_create_routing_process (void)
132 assert (babel_routing_process
== NULL
);
134 /* Allocaste Babel instance. */
135 babel_routing_process
= XCALLOC(MTYPE_BABEL
, sizeof(struct babel
));
137 /* Initialize timeouts */
139 expiry_time
= babel_now
.tv_sec
+ roughly(30);
140 source_expiry_time
= babel_now
.tv_sec
+ roughly(300);
142 /* Make socket for Babel protocol. */
143 protocol_socket
= babel_socket(protocol_port
);
144 if (protocol_socket
< 0) {
145 flog_err_sys(EC_LIB_SOCKET
, "Couldn't create link local socket: %s",
146 safe_strerror(errno
));
151 event_add_read(master
, babel_read_protocol
, NULL
, protocol_socket
,
152 &babel_routing_process
->t_read
);
153 /* wait a little: zebra will announce interfaces, addresses, routes... */
154 event_add_timer_msec(master
, babel_init_routing_process
, NULL
, 200L,
155 &babel_routing_process
->t_update
);
157 /* Distribute list install. */
158 babel_routing_process
->distribute_ctx
= distribute_list_ctx_create (vrf_lookup_by_id(VRF_DEFAULT
));
159 distribute_list_add_hook (babel_routing_process
->distribute_ctx
, babel_distribute_update
);
160 distribute_list_delete_hook (babel_routing_process
->distribute_ctx
, babel_distribute_update
);
163 XFREE(MTYPE_BABEL
, babel_routing_process
);
167 /* thread reading entries form others babel daemons */
168 static void babel_read_protocol(struct event
*thread
)
171 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
172 struct interface
*ifp
= NULL
;
173 struct sockaddr_in6 sin6
;
175 assert(babel_routing_process
!= NULL
);
176 assert(protocol_socket
>= 0);
178 rc
= babel_recv(protocol_socket
,
179 receive_buffer
, receive_buffer_size
,
180 (struct sockaddr
*)&sin6
, sizeof(sin6
));
182 if(errno
!= EAGAIN
&& errno
!= EINTR
) {
183 flog_err_sys(EC_LIB_SOCKET
, "recv: %s", safe_strerror(errno
));
186 FOR_ALL_INTERFACES(vrf
, ifp
) {
189 if(ifp
->ifindex
== (ifindex_t
)sin6
.sin6_scope_id
) {
190 parse_packet((unsigned char*)&sin6
.sin6_addr
, ifp
,
198 event_add_read(master
, &babel_read_protocol
, NULL
, protocol_socket
,
199 &babel_routing_process
->t_read
);
202 /* Zebra will give some information, especially about interfaces. This function
203 must be call with a litte timeout wich may give zebra the time to do his job,
204 making these inits have sense. */
205 static void babel_init_routing_process(struct event
*thread
)
207 myseqno
= (frr_weak_random() & 0xFFFF);
209 babel_load_state_file();
210 debugf(BABEL_DEBUG_COMMON
, "My ID is : %s.", format_eui64(myid
));
211 babel_initial_noise();
212 babel_main_loop(thread
);/* this function self-add to the t_update thread */
215 /* fill "myid" with an unique id (only if myid != {0}). */
219 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
220 struct interface
*ifp
= NULL
;
224 /* if we already have an id (from state file), we return. */
225 if (memcmp(myid
, zeroes
, 8) != 0) {
229 FOR_ALL_INTERFACES(vrf
, ifp
) {
230 /* ifp->ifindex is not necessarily valid at this point */
231 int ifindex
= if_nametoindex(ifp
->name
);
233 unsigned char eui
[8];
234 rc
= if_eui64(ifindex
, eui
);
237 memcpy(myid
, eui
, 8);
242 /* We failed to get a global EUI64 from the interfaces we were given.
243 Let's try to find an interface with a MAC address. */
244 for(i
= 1; i
< 256; i
++) {
245 char buf
[INTERFACE_NAMSIZ
], *ifname
;
246 unsigned char eui
[8];
247 ifname
= if_indextoname(i
, buf
);
250 rc
= if_eui64(i
, eui
);
253 memcpy(myid
, eui
, 8);
257 flog_err(EC_BABEL_CONFIG
, "Couldn't find router id -- using random value.");
259 rc
= read_random_bytes(myid
, 8);
261 flog_err(EC_BABEL_CONFIG
, "read(random): %s (cannot assign an ID)",
262 safe_strerror(errno
));
265 /* Clear group and global bits */
266 UNSET_FLAG (myid
[0], 3);
269 /* Make some noise so that others notice us, and send retractions in
270 case we were restarted recently */
272 babel_initial_noise(void)
274 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
275 struct interface
*ifp
= NULL
;
277 FOR_ALL_INTERFACES(vrf
, ifp
) {
280 /* Apply jitter before we send the first message. */
281 usleep(roughly(10000));
284 send_wildcard_retraction(ifp
);
287 FOR_ALL_INTERFACES(vrf
, ifp
) {
290 usleep(roughly(10000));
293 send_wildcard_retraction(ifp
);
294 send_self_update(ifp
);
295 send_request(ifp
, NULL
, 0);
301 /* Delete all the added babel routes, make babeld only speak to zebra. */
303 babel_clean_routing_process(void)
306 babel_interface_close_all();
309 event_cancel(&babel_routing_process
->t_read
);
310 event_cancel(&babel_routing_process
->t_update
);
312 distribute_list_delete(&babel_routing_process
->distribute_ctx
);
313 XFREE(MTYPE_BABEL
, babel_routing_process
);
316 /* Function used with timeout. */
317 static void babel_main_loop(struct event
*thread
)
320 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
321 struct interface
*ifp
= NULL
;
326 /* timeouts --------------------------------------------------------- */
327 /* get the next timeout */
328 babel_fill_with_next_timeout(&tv
);
329 /* if there is no timeout, we must wait. */
330 if(timeval_compare(&tv
, &babel_now
) > 0) {
331 timeval_minus(&tv
, &tv
, &babel_now
);
332 debugf(BABEL_DEBUG_TIMEOUT
, "babel main loop : timeout: %lld msecs",
333 (long long)tv
.tv_sec
* 1000 + tv
.tv_usec
/ 1000);
334 /* it happens often to have less than 1 ms, it's bad. */
335 timeval_add_msec(&tv
, &tv
, 300);
336 babel_set_timer(&tv
);
342 /* update database -------------------------------------------------- */
343 if(timeval_compare(&check_neighbours_timeout
, &babel_now
) < 0) {
345 msecs
= check_neighbours();
346 /* Multiply by 3/2 to allow neighbours to expire. */
347 msecs
= MAX(3 * msecs
/ 2, 10);
348 schedule_neighbours_check(msecs
, 1);
351 if(babel_now
.tv_sec
>= expiry_time
) {
354 expiry_time
= babel_now
.tv_sec
+ roughly(30);
357 if(babel_now
.tv_sec
>= source_expiry_time
) {
359 source_expiry_time
= babel_now
.tv_sec
+ roughly(300);
362 FOR_ALL_INTERFACES(vrf
, ifp
) {
363 babel_interface_nfo
*babel_ifp
= NULL
;
366 babel_ifp
= babel_get_if_nfo(ifp
);
367 if(timeval_compare(&babel_now
, &babel_ifp
->hello_timeout
) >= 0)
369 if(timeval_compare(&babel_now
, &babel_ifp
->update_timeout
) >= 0)
370 send_update(ifp
, 0, NULL
, 0);
371 if(timeval_compare(&babel_now
,
372 &babel_ifp
->update_flush_timeout
) >= 0)
376 if(resend_time
.tv_sec
!= 0) {
377 if(timeval_compare(&babel_now
, &resend_time
) >= 0)
381 if(unicast_flush_timeout
.tv_sec
!= 0) {
382 if(timeval_compare(&babel_now
, &unicast_flush_timeout
) >= 0)
386 FOR_ALL_INTERFACES(vrf
, ifp
) {
387 babel_interface_nfo
*babel_ifp
= NULL
;
390 babel_ifp
= babel_get_if_nfo(ifp
);
391 if(babel_ifp
->flush_timeout
.tv_sec
!= 0) {
392 if(timeval_compare(&babel_now
, &babel_ifp
->flush_timeout
) >= 0)
398 assert(0); /* this line should never be reach */
402 printIfMin(struct timeval
*tv
, int cmd
, const char *tag
, const char *ifname
)
404 static struct timeval curr_tv
;
405 static char buffer
[200];
406 static const char *curr_tag
= NULL
;
409 case 0: /* reset timeval */
412 snprintf(buffer
, 200L, "interface: %s; %s", ifname
, tag
);
418 case 1: /* take the min */
419 if (tv
->tv_sec
== 0 && tv
->tv_usec
== 0) { /* if (tv == ∞) */
422 if (tv
->tv_sec
< curr_tv
.tv_sec
||(tv
->tv_sec
== curr_tv
.tv_sec
&&
423 tv
->tv_usec
< curr_tv
.tv_usec
)) {
426 snprintf(buffer
, 200L, "interface: %s; %s", ifname
, tag
);
433 case 2: /* print message */
434 debugf(BABEL_DEBUG_TIMEOUT
, "next timeout due to: %s", curr_tag
);
442 babel_fill_with_next_timeout(struct timeval
*tv
)
444 #if (defined NO_DEBUG)
445 #define printIfMin(a,b,c,d)
447 #define printIfMin(a, b, c, d) \
448 if (unlikely(debug & BABEL_DEBUG_TIMEOUT)) { \
449 printIfMin(a, b, c, d); \
452 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
453 struct interface
*ifp
= NULL
;
455 *tv
= check_neighbours_timeout
;
456 printIfMin(tv
, 0, "check_neighbours_timeout", NULL
);
457 timeval_min_sec(tv
, expiry_time
);
458 printIfMin(tv
, 1, "expiry_time", NULL
);
459 timeval_min_sec(tv
, source_expiry_time
);
460 printIfMin(tv
, 1, "source_expiry_time", NULL
);
461 timeval_min(tv
, &resend_time
);
462 printIfMin(tv
, 1, "resend_time", NULL
);
463 FOR_ALL_INTERFACES (vrf
, ifp
) {
464 babel_interface_nfo
*babel_ifp
= NULL
;
467 babel_ifp
= babel_get_if_nfo(ifp
);
468 timeval_min(tv
, &babel_ifp
->flush_timeout
);
469 printIfMin(tv
, 1, "flush_timeout", ifp
->name
);
470 timeval_min(tv
, &babel_ifp
->hello_timeout
);
471 printIfMin(tv
, 1, "hello_timeout", ifp
->name
);
472 timeval_min(tv
, &babel_ifp
->update_timeout
);
473 printIfMin(tv
, 1, "update_timeout", ifp
->name
);
474 timeval_min(tv
, &babel_ifp
->update_flush_timeout
);
475 printIfMin(tv
, 1, "update_flush_timeout", ifp
->name
);
477 timeval_min(tv
, &unicast_flush_timeout
);
478 printIfMin(tv
, 1, "unicast_flush_timeout", NULL
);
479 printIfMin(tv
, 2, NULL
, NULL
);
484 /* set the t_update thread of the babel routing process to be launch in
485 'timeout' (approximate at the milisecond) */
487 babel_set_timer(struct timeval
*timeout
)
489 long msecs
= timeout
->tv_sec
* 1000 + timeout
->tv_usec
/ 1000;
490 event_cancel(&(babel_routing_process
->t_update
));
491 event_add_timer_msec(master
, babel_main_loop
, NULL
, msecs
,
492 &babel_routing_process
->t_update
);
496 schedule_neighbours_check(int msecs
, int override
)
498 struct timeval timeout
;
500 timeval_add_msec(&timeout
, &babel_now
, msecs
);
502 check_neighbours_timeout
= timeout
;
504 timeval_min(&check_neighbours_timeout
, &timeout
);
508 resize_receive_buffer(int size
)
510 if(size
<= receive_buffer_size
)
513 if(receive_buffer
== NULL
) {
514 receive_buffer
= malloc(size
);
515 if(receive_buffer
== NULL
) {
516 flog_err(EC_BABEL_MEMORY
, "malloc(receive_buffer): %s",
517 safe_strerror(errno
));
520 receive_buffer_size
= size
;
523 new = realloc(receive_buffer
, size
);
525 flog_err(EC_BABEL_MEMORY
, "realloc(receive_buffer): %s",
526 safe_strerror(errno
));
529 receive_buffer
= new;
530 receive_buffer_size
= size
;
536 babel_distribute_update (struct distribute_ctx
*ctx
, struct distribute
*dist
)
538 struct interface
*ifp
;
539 babel_interface_nfo
*babel_ifp
;
546 ifp
= if_lookup_by_name (dist
->ifname
, VRF_DEFAULT
);
550 babel_ifp
= babel_get_if_nfo(ifp
);
552 for (type
= 0; type
< DISTRIBUTE_MAX
; type
++) {
553 family
= type
== DISTRIBUTE_V4_IN
|| type
== DISTRIBUTE_V4_OUT
?
555 if (dist
->list
[type
])
556 babel_ifp
->list
[type
] = access_list_lookup (family
,
559 babel_ifp
->list
[type
] = NULL
;
560 if (dist
->prefix
[type
])
561 babel_ifp
->prefix
[type
] = prefix_list_lookup (family
,
564 babel_ifp
->prefix
[type
] = NULL
;
569 babel_distribute_update_interface (struct interface
*ifp
)
571 struct distribute
*dist
= NULL
;
573 if (babel_routing_process
)
574 dist
= distribute_lookup(babel_routing_process
->distribute_ctx
, ifp
->name
);
576 babel_distribute_update (babel_routing_process
->distribute_ctx
, dist
);
579 /* Update all interface's distribute list. */
581 babel_distribute_update_all (struct prefix_list
*notused
)
583 struct vrf
*vrf
= vrf_lookup_by_id(VRF_DEFAULT
);
584 struct interface
*ifp
;
586 FOR_ALL_INTERFACES (vrf
, ifp
)
587 babel_distribute_update_interface (ifp
);
591 babel_distribute_update_all_wrapper (struct access_list
*notused
)
593 babel_distribute_update_all(NULL
);
598 DEFUN_NOSH (router_babel
,
601 "Enable a routing process\n"
602 "Make Babel instance command\n")
606 vty
->node
= BABEL_NODE
;
608 if (!babel_routing_process
) {
609 ret
= babel_create_routing_process ();
611 /* Notice to user we couldn't create Babel. */
613 zlog_warn ("can't create Babel");
622 DEFUN (no_router_babel
,
626 "Disable a routing process\n"
627 "Remove Babel instance command\n")
629 if(babel_routing_process
)
630 babel_clean_routing_process();
634 /* [Babel Command] */
635 DEFUN (babel_diversity
,
639 "Enable diversity-aware routing.\n")
641 diversity_kind
= DIVERSITY_CHANNEL
;
645 /* [Babel Command] */
646 DEFUN (no_babel_diversity
,
647 no_babel_diversity_cmd
,
648 "no babel diversity",
651 "Disable diversity-aware routing.\n")
653 diversity_kind
= DIVERSITY_NONE
;
657 /* [Babel Command] */
658 DEFPY (babel_diversity_factor
,
659 babel_diversity_factor_cmd
,
660 "[no] babel diversity-factor (1-256)$factor",
663 "Set the diversity factor.\n"
664 "Factor in units of 1/256.\n")
666 diversity_factor
= no
? BABEL_DEFAULT_DIVERSITY_FACTOR
: factor
;
670 /* [Babel Command] */
671 DEFPY (babel_set_resend_delay
,
672 babel_set_resend_delay_cmd
,
673 "[no] babel resend-delay (20-655340)$delay",
676 "Time before resending a message\n"
679 resend_delay
= no
? BABEL_DEFAULT_RESEND_DELAY
: delay
;
683 /* [Babel Command] */
684 DEFPY (babel_set_smoothing_half_life
,
685 babel_set_smoothing_half_life_cmd
,
686 "[no] babel smoothing-half-life (0-65534)$seconds",
689 "Smoothing half-life\n"
690 "Seconds (0 to disable)\n")
692 change_smoothing_half_life(no
? BABEL_DEFAULT_SMOOTHING_HALF_LIFE
697 DEFUN (babel_distribute_list
,
698 babel_distribute_list_cmd
,
699 "distribute-list [prefix] ACCESSLIST4_NAME <in|out> [WORD]",
700 "Filter networks in routing updates\n"
703 "Filter incoming routing updates\n"
704 "Filter outgoing routing updates\n"
707 const char *ifname
= NULL
;
708 int prefix
= (argv
[1]->type
== WORD_TKN
) ? 1 : 0;
710 if (argv
[argc
- 1]->type
== VARIABLE_TKN
)
711 ifname
= argv
[argc
- 1]->arg
;
713 return distribute_list_parser(prefix
, true, argv
[2 + prefix
]->text
,
714 argv
[1 + prefix
]->arg
, ifname
);
717 DEFUN (babel_no_distribute_list
,
718 babel_no_distribute_list_cmd
,
719 "no distribute-list [prefix] ACCESSLIST4_NAME <in|out> [WORD]",
721 "Filter networks in routing updates\n"
724 "Filter incoming routing updates\n"
725 "Filter outgoing routing updates\n"
728 const char *ifname
= NULL
;
729 int prefix
= (argv
[2]->type
== WORD_TKN
) ? 1 : 0;
731 if (argv
[argc
- 1]->type
== VARIABLE_TKN
)
732 ifname
= argv
[argc
- 1]->arg
;
734 return distribute_list_no_parser(vty
, prefix
, true,
735 argv
[3 + prefix
]->text
,
736 argv
[2 + prefix
]->arg
, ifname
);
739 DEFUN (babel_ipv6_distribute_list
,
740 babel_ipv6_distribute_list_cmd
,
741 "ipv6 distribute-list [prefix] ACCESSLIST6_NAME <in|out> [WORD]",
743 "Filter networks in routing updates\n"
746 "Filter incoming routing updates\n"
747 "Filter outgoing routing updates\n"
750 const char *ifname
= NULL
;
751 int prefix
= (argv
[2]->type
== WORD_TKN
) ? 1 : 0;
753 if (argv
[argc
- 1]->type
== VARIABLE_TKN
)
754 ifname
= argv
[argc
- 1]->arg
;
756 return distribute_list_parser(prefix
, false, argv
[3 + prefix
]->text
,
757 argv
[2 + prefix
]->arg
, ifname
);
760 DEFUN (babel_no_ipv6_distribute_list
,
761 babel_no_ipv6_distribute_list_cmd
,
762 "no ipv6 distribute-list [prefix] ACCESSLIST6_NAME <in|out> [WORD]",
765 "Filter networks in routing updates\n"
768 "Filter incoming routing updates\n"
769 "Filter outgoing routing updates\n"
772 const char *ifname
= NULL
;
773 int prefix
= (argv
[3]->type
== WORD_TKN
) ? 1 : 0;
775 if (argv
[argc
- 1]->type
== VARIABLE_TKN
)
776 ifname
= argv
[argc
- 1]->arg
;
778 return distribute_list_no_parser(vty
, prefix
, false,
779 argv
[4 + prefix
]->text
,
780 argv
[3 + prefix
]->arg
, ifname
);
784 babeld_quagga_init(void)
787 install_node(&cmd_babel_node
);
789 install_element(CONFIG_NODE
, &router_babel_cmd
);
790 install_element(CONFIG_NODE
, &no_router_babel_cmd
);
792 install_default(BABEL_NODE
);
793 install_element(BABEL_NODE
, &babel_diversity_cmd
);
794 install_element(BABEL_NODE
, &no_babel_diversity_cmd
);
795 install_element(BABEL_NODE
, &babel_diversity_factor_cmd
);
796 install_element(BABEL_NODE
, &babel_set_resend_delay_cmd
);
797 install_element(BABEL_NODE
, &babel_set_smoothing_half_life_cmd
);
799 install_element(BABEL_NODE
, &babel_distribute_list_cmd
);
800 install_element(BABEL_NODE
, &babel_no_distribute_list_cmd
);
801 install_element(BABEL_NODE
, &babel_ipv6_distribute_list_cmd
);
802 install_element(BABEL_NODE
, &babel_no_ipv6_distribute_list_cmd
);
808 /* Access list install. */
810 access_list_add_hook (babel_distribute_update_all_wrapper
);
811 access_list_delete_hook (babel_distribute_update_all_wrapper
);
813 /* Prefix list initialize.*/
815 prefix_list_add_hook (babel_distribute_update_all
);
816 prefix_list_delete_hook (babel_distribute_update_all
);
819 /* Stubs to adapt Babel's filtering calls to Quagga's infrastructure. */
822 input_filter(const unsigned char *id
,
823 const unsigned char *prefix
, unsigned short plen
,
824 const unsigned char *neigh
, unsigned int ifindex
)
826 return babel_filter(0, prefix
, plen
, ifindex
);
830 output_filter(const unsigned char *id
, const unsigned char *prefix
,
831 unsigned short plen
, unsigned int ifindex
)
833 return babel_filter(1, prefix
, plen
, ifindex
);
836 /* There's no redistribute filter in Quagga -- the zebra daemon does its
839 redistribute_filter(const unsigned char *prefix
, unsigned short plen
,
840 unsigned int ifindex
, int proto
)
845 struct babel
*babel_lookup(void)
847 return babel_routing_process
;