1 /* Distribute list functions
2 * Copyright (C) 1998, 1999 Kunihiro Ishiguro
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published
8 * by the Free Software Foundation; either version 2, or (at your
9 * option) any later version.
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
28 #include "distribute.h"
31 /* Hash of distribute list. */
32 struct hash
*disthash
;
35 void (*distribute_add_hook
) (struct distribute
*);
36 void (*distribute_delete_hook
) (struct distribute
*);
38 static struct distribute
*
41 return XCALLOC (MTYPE_DISTRIBUTE
, sizeof (struct distribute
));
44 /* Free distribute object. */
46 distribute_free (struct distribute
*dist
)
49 XFREE (MTYPE_DISTRIBUTE_IFNAME
, dist
->ifname
);
51 if (dist
->list
[DISTRIBUTE_IN
])
52 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
53 if (dist
->list
[DISTRIBUTE_OUT
])
54 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
56 if (dist
->prefix
[DISTRIBUTE_IN
])
57 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
58 if (dist
->prefix
[DISTRIBUTE_OUT
])
59 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
61 XFREE (MTYPE_DISTRIBUTE
, dist
);
64 /* Lookup interface's distribute list. */
66 distribute_lookup (const char *ifname
)
68 struct distribute key
;
69 struct distribute
*dist
;
71 /* temporary reference */
72 key
.ifname
= (ifname
) ? XSTRDUP(MTYPE_DISTRIBUTE_IFNAME
, ifname
) : NULL
;
74 dist
= hash_lookup (disthash
, &key
);
77 XFREE(MTYPE_DISTRIBUTE_IFNAME
, key
.ifname
);
83 distribute_list_add_hook (void (*func
) (struct distribute
*))
85 distribute_add_hook
= func
;
89 distribute_list_delete_hook (void (*func
) (struct distribute
*))
91 distribute_delete_hook
= func
;
95 distribute_hash_alloc (struct distribute
*arg
)
97 struct distribute
*dist
;
99 dist
= distribute_new ();
101 dist
->ifname
= XSTRDUP (MTYPE_DISTRIBUTE_IFNAME
, arg
->ifname
);
107 /* Make new distribute list and push into hash. */
108 static struct distribute
*
109 distribute_get (const char *ifname
)
111 struct distribute key
;
112 struct distribute
*ret
;
114 /* temporary reference */
115 key
.ifname
= (ifname
) ? XSTRDUP(MTYPE_DISTRIBUTE_IFNAME
, ifname
) : NULL
;
117 ret
= hash_get (disthash
, &key
, (void * (*) (void *))distribute_hash_alloc
);
120 XFREE(MTYPE_DISTRIBUTE_IFNAME
, key
.ifname
);
126 distribute_hash_make (void *arg
)
128 const struct distribute
*dist
= arg
;
130 return dist
->ifname
? string_hash_make (dist
->ifname
) : 0;
133 /* If two distribute-list have same value then return 1 else return
134 0. This function is used by hash package. */
136 distribute_cmp (const struct distribute
*dist1
, const struct distribute
*dist2
)
138 if (dist1
->ifname
&& dist2
->ifname
)
139 if (strcmp (dist1
->ifname
, dist2
->ifname
) == 0)
141 if (! dist1
->ifname
&& ! dist2
->ifname
)
146 /* Set access-list name to the distribute list. */
147 static struct distribute
*
148 distribute_list_set (const char *ifname
, enum distribute_type type
,
149 const char *alist_name
)
151 struct distribute
*dist
;
153 dist
= distribute_get (ifname
);
155 if (type
== DISTRIBUTE_IN
)
157 if (dist
->list
[DISTRIBUTE_IN
])
158 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
159 dist
->list
[DISTRIBUTE_IN
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, alist_name
);
161 if (type
== DISTRIBUTE_OUT
)
163 if (dist
->list
[DISTRIBUTE_OUT
])
164 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
165 dist
->list
[DISTRIBUTE_OUT
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, alist_name
);
168 /* Apply this distribute-list to the interface. */
169 (*distribute_add_hook
) (dist
);
174 /* Unset distribute-list. If matched distribute-list exist then
177 distribute_list_unset (const char *ifname
, enum distribute_type type
,
178 const char *alist_name
)
180 struct distribute
*dist
;
182 dist
= distribute_lookup (ifname
);
186 if (type
== DISTRIBUTE_IN
)
188 if (!dist
->list
[DISTRIBUTE_IN
])
190 if (strcmp (dist
->list
[DISTRIBUTE_IN
], alist_name
) != 0)
193 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
194 dist
->list
[DISTRIBUTE_IN
] = NULL
;
197 if (type
== DISTRIBUTE_OUT
)
199 if (!dist
->list
[DISTRIBUTE_OUT
])
201 if (strcmp (dist
->list
[DISTRIBUTE_OUT
], alist_name
) != 0)
204 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
205 dist
->list
[DISTRIBUTE_OUT
] = NULL
;
208 /* Apply this distribute-list to the interface. */
209 (*distribute_delete_hook
) (dist
);
211 /* If both out and in is NULL then free distribute list. */
212 if (dist
->list
[DISTRIBUTE_IN
] == NULL
&&
213 dist
->list
[DISTRIBUTE_OUT
] == NULL
&&
214 dist
->prefix
[DISTRIBUTE_IN
] == NULL
&&
215 dist
->prefix
[DISTRIBUTE_OUT
] == NULL
)
217 hash_release (disthash
, dist
);
218 distribute_free (dist
);
224 /* Set access-list name to the distribute list. */
225 static struct distribute
*
226 distribute_list_prefix_set (const char *ifname
, enum distribute_type type
,
227 const char *plist_name
)
229 struct distribute
*dist
;
231 dist
= distribute_get (ifname
);
233 if (type
== DISTRIBUTE_IN
)
235 if (dist
->prefix
[DISTRIBUTE_IN
])
236 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
237 dist
->prefix
[DISTRIBUTE_IN
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, plist_name
);
239 if (type
== DISTRIBUTE_OUT
)
241 if (dist
->prefix
[DISTRIBUTE_OUT
])
242 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
243 dist
->prefix
[DISTRIBUTE_OUT
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, plist_name
);
246 /* Apply this distribute-list to the interface. */
247 (*distribute_add_hook
) (dist
);
252 /* Unset distribute-list. If matched distribute-list exist then
255 distribute_list_prefix_unset (const char *ifname
, enum distribute_type type
,
256 const char *plist_name
)
258 struct distribute
*dist
;
260 dist
= distribute_lookup (ifname
);
264 if (type
== DISTRIBUTE_IN
)
266 if (!dist
->prefix
[DISTRIBUTE_IN
])
268 if (strcmp (dist
->prefix
[DISTRIBUTE_IN
], plist_name
) != 0)
271 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
272 dist
->prefix
[DISTRIBUTE_IN
] = NULL
;
275 if (type
== DISTRIBUTE_OUT
)
277 if (!dist
->prefix
[DISTRIBUTE_OUT
])
279 if (strcmp (dist
->prefix
[DISTRIBUTE_OUT
], plist_name
) != 0)
282 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
283 dist
->prefix
[DISTRIBUTE_OUT
] = NULL
;
286 /* Apply this distribute-list to the interface. */
287 (*distribute_delete_hook
) (dist
);
289 /* If both out and in is NULL then free distribute list. */
290 if (dist
->list
[DISTRIBUTE_IN
] == NULL
&&
291 dist
->list
[DISTRIBUTE_OUT
] == NULL
&&
292 dist
->prefix
[DISTRIBUTE_IN
] == NULL
&&
293 dist
->prefix
[DISTRIBUTE_OUT
] == NULL
)
295 hash_release (disthash
, dist
);
296 distribute_free (dist
);
302 DEFUN (distribute_list_all
,
303 distribute_list_all_cmd
,
304 "distribute-list WORD (in|out)",
305 "Filter networks in routing updates\n"
307 "Filter incoming routing updates\n"
308 "Filter outgoing routing updates\n")
310 enum distribute_type type
;
312 /* Check of distribute list type. */
313 if (strncmp (argv
[1], "i", 1) == 0)
314 type
= DISTRIBUTE_IN
;
315 else if (strncmp (argv
[1], "o", 1) == 0)
316 type
= DISTRIBUTE_OUT
;
319 vty_out (vty
, "distribute list direction must be [in|out]%s",
324 /* Get interface name corresponding distribute list. */
325 distribute_list_set (NULL
, type
, argv
[0]);
330 ALIAS (distribute_list_all
,
331 ipv6_distribute_list_all_cmd
,
332 "distribute-list WORD (in|out)",
333 "Filter networks in routing updates\n"
335 "Filter incoming routing updates\n"
336 "Filter outgoing routing updates\n")
338 DEFUN (no_distribute_list_all
,
339 no_distribute_list_all_cmd
,
340 "no distribute-list WORD (in|out)",
342 "Filter networks in routing updates\n"
344 "Filter incoming routing updates\n"
345 "Filter outgoing routing updates\n")
348 enum distribute_type type
;
350 /* Check of distribute list type. */
351 if (strncmp (argv
[1], "i", 1) == 0)
352 type
= DISTRIBUTE_IN
;
353 else if (strncmp (argv
[1], "o", 1) == 0)
354 type
= DISTRIBUTE_OUT
;
357 vty_out (vty
, "distribute list direction must be [in|out]%s",
362 ret
= distribute_list_unset (NULL
, type
, argv
[0]);
365 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
371 ALIAS (no_distribute_list_all
,
372 no_ipv6_distribute_list_all_cmd
,
373 "no distribute-list WORD (in|out)",
375 "Filter networks in routing updates\n"
377 "Filter incoming routing updates\n"
378 "Filter outgoing routing updates\n")
380 DEFUN (distribute_list
,
382 "distribute-list WORD (in|out) WORD",
383 "Filter networks in routing updates\n"
385 "Filter incoming routing updates\n"
386 "Filter outgoing routing updates\n"
389 enum distribute_type type
;
391 /* Check of distribute list type. */
392 if (strncmp (argv
[1], "i", 1) == 0)
393 type
= DISTRIBUTE_IN
;
394 else if (strncmp (argv
[1], "o", 1) == 0)
395 type
= DISTRIBUTE_OUT
;
398 vty_out (vty
, "distribute list direction must be [in|out]%s", VTY_NEWLINE
);
402 /* Get interface name corresponding distribute list. */
403 distribute_list_set (argv
[2], type
, argv
[0]);
408 ALIAS (distribute_list
,
409 ipv6_distribute_list_cmd
,
410 "distribute-list WORD (in|out) WORD",
411 "Filter networks in routing updates\n"
413 "Filter incoming routing updates\n"
414 "Filter outgoing routing updates\n"
417 DEFUN (no_distribute_list
, no_distribute_list_cmd
,
418 "no distribute-list WORD (in|out) WORD",
420 "Filter networks in routing updates\n"
422 "Filter incoming routing updates\n"
423 "Filter outgoing routing updates\n"
427 enum distribute_type type
;
429 /* Check of distribute list type. */
430 if (strncmp (argv
[1], "i", 1) == 0)
431 type
= DISTRIBUTE_IN
;
432 else if (strncmp (argv
[1], "o", 1) == 0)
433 type
= DISTRIBUTE_OUT
;
436 vty_out (vty
, "distribute list direction must be [in|out]%s", VTY_NEWLINE
);
440 ret
= distribute_list_unset (argv
[2], type
, argv
[0]);
443 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
449 ALIAS (no_distribute_list
, no_ipv6_distribute_list_cmd
,
450 "no distribute-list WORD (in|out) WORD",
452 "Filter networks in routing updates\n"
454 "Filter incoming routing updates\n"
455 "Filter outgoing routing updates\n"
458 DEFUN (distribute_list_prefix_all
,
459 distribute_list_prefix_all_cmd
,
460 "distribute-list prefix WORD (in|out)",
461 "Filter networks in routing updates\n"
462 "Filter prefixes in routing updates\n"
463 "Name of an IP prefix-list\n"
464 "Filter incoming routing updates\n"
465 "Filter outgoing routing updates\n")
467 enum distribute_type type
;
469 /* Check of distribute list type. */
470 if (strncmp (argv
[1], "i", 1) == 0)
471 type
= DISTRIBUTE_IN
;
472 else if (strncmp (argv
[1], "o", 1) == 0)
473 type
= DISTRIBUTE_OUT
;
476 vty_out (vty
, "distribute list direction must be [in|out]%s",
481 /* Get interface name corresponding distribute list. */
482 distribute_list_prefix_set (NULL
, type
, argv
[0]);
487 ALIAS (distribute_list_prefix_all
,
488 ipv6_distribute_list_prefix_all_cmd
,
489 "distribute-list prefix WORD (in|out)",
490 "Filter networks in routing updates\n"
491 "Filter prefixes in routing updates\n"
492 "Name of an IP prefix-list\n"
493 "Filter incoming routing updates\n"
494 "Filter outgoing routing updates\n")
496 DEFUN (no_distribute_list_prefix_all
,
497 no_distribute_list_prefix_all_cmd
,
498 "no distribute-list prefix WORD (in|out)",
500 "Filter networks in routing updates\n"
501 "Filter prefixes in routing updates\n"
502 "Name of an IP prefix-list\n"
503 "Filter incoming routing updates\n"
504 "Filter outgoing routing updates\n")
507 enum distribute_type type
;
509 /* Check of distribute list type. */
510 if (strncmp (argv
[1], "i", 1) == 0)
511 type
= DISTRIBUTE_IN
;
512 else if (strncmp (argv
[1], "o", 1) == 0)
513 type
= DISTRIBUTE_OUT
;
516 vty_out (vty
, "distribute list direction must be [in|out]%s",
521 ret
= distribute_list_prefix_unset (NULL
, type
, argv
[0]);
524 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
530 ALIAS (no_distribute_list_prefix_all
,
531 no_ipv6_distribute_list_prefix_all_cmd
,
532 "no distribute-list prefix WORD (in|out)",
534 "Filter networks in routing updates\n"
535 "Filter prefixes in routing updates\n"
536 "Name of an IP prefix-list\n"
537 "Filter incoming routing updates\n"
538 "Filter outgoing routing updates\n")
540 DEFUN (distribute_list_prefix
, distribute_list_prefix_cmd
,
541 "distribute-list prefix WORD (in|out) WORD",
542 "Filter networks in routing updates\n"
543 "Filter prefixes in routing updates\n"
544 "Name of an IP prefix-list\n"
545 "Filter incoming routing updates\n"
546 "Filter outgoing routing updates\n"
549 enum distribute_type type
;
551 /* Check of distribute list type. */
552 if (strncmp (argv
[1], "i", 1) == 0)
553 type
= DISTRIBUTE_IN
;
554 else if (strncmp (argv
[1], "o", 1) == 0)
555 type
= DISTRIBUTE_OUT
;
558 vty_out (vty
, "distribute list direction must be [in|out]%s",
563 /* Get interface name corresponding distribute list. */
564 distribute_list_prefix_set (argv
[2], type
, argv
[0]);
569 ALIAS (distribute_list_prefix
, ipv6_distribute_list_prefix_cmd
,
570 "distribute-list prefix WORD (in|out) WORD",
571 "Filter networks in routing updates\n"
572 "Filter prefixes in routing updates\n"
573 "Name of an IP prefix-list\n"
574 "Filter incoming routing updates\n"
575 "Filter outgoing routing updates\n"
578 DEFUN (no_distribute_list_prefix
, no_distribute_list_prefix_cmd
,
579 "no distribute-list prefix WORD (in|out) WORD",
581 "Filter networks in routing updates\n"
582 "Filter prefixes in routing updates\n"
583 "Name of an IP prefix-list\n"
584 "Filter incoming routing updates\n"
585 "Filter outgoing routing updates\n"
589 enum distribute_type type
;
591 /* Check of distribute list type. */
592 if (strncmp (argv
[1], "i", 1) == 0)
593 type
= DISTRIBUTE_IN
;
594 else if (strncmp (argv
[1], "o", 1) == 0)
595 type
= DISTRIBUTE_OUT
;
598 vty_out (vty
, "distribute list direction must be [in|out]%s",
603 ret
= distribute_list_prefix_unset (argv
[2], type
, argv
[0]);
606 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
612 ALIAS (no_distribute_list_prefix
, no_ipv6_distribute_list_prefix_cmd
,
613 "no distribute-list prefix WORD (in|out) WORD",
615 "Filter networks in routing updates\n"
616 "Filter prefixes in routing updates\n"
617 "Name of an IP prefix-list\n"
618 "Filter incoming routing updates\n"
619 "Filter outgoing routing updates\n"
623 config_show_distribute (struct vty
*vty
)
626 struct hash_backet
*mp
;
627 struct distribute
*dist
;
629 /* Output filter configuration. */
630 dist
= distribute_lookup (NULL
);
631 if (dist
&& (dist
->list
[DISTRIBUTE_OUT
] || dist
->prefix
[DISTRIBUTE_OUT
]))
633 vty_out (vty
, " Outgoing update filter list for all interface is");
634 if (dist
->list
[DISTRIBUTE_OUT
])
635 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_OUT
]);
636 if (dist
->prefix
[DISTRIBUTE_OUT
])
637 vty_out (vty
, "%s (prefix-list) %s",
638 dist
->list
[DISTRIBUTE_OUT
] ? "," : "",
639 dist
->prefix
[DISTRIBUTE_OUT
]);
640 vty_out (vty
, "%s", VTY_NEWLINE
);
643 vty_out (vty
, " Outgoing update filter list for all interface is not set%s", VTY_NEWLINE
);
645 for (i
= 0; i
< disthash
->size
; i
++)
646 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
650 if (dist
->list
[DISTRIBUTE_OUT
] || dist
->prefix
[DISTRIBUTE_OUT
])
652 vty_out (vty
, " %s filtered by", dist
->ifname
);
653 if (dist
->list
[DISTRIBUTE_OUT
])
654 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_OUT
]);
655 if (dist
->prefix
[DISTRIBUTE_OUT
])
656 vty_out (vty
, "%s (prefix-list) %s",
657 dist
->list
[DISTRIBUTE_OUT
] ? "," : "",
658 dist
->prefix
[DISTRIBUTE_OUT
]);
659 vty_out (vty
, "%s", VTY_NEWLINE
);
664 /* Input filter configuration. */
665 dist
= distribute_lookup (NULL
);
666 if (dist
&& (dist
->list
[DISTRIBUTE_IN
] || dist
->prefix
[DISTRIBUTE_IN
]))
668 vty_out (vty
, " Incoming update filter list for all interface is");
669 if (dist
->list
[DISTRIBUTE_IN
])
670 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_IN
]);
671 if (dist
->prefix
[DISTRIBUTE_IN
])
672 vty_out (vty
, "%s (prefix-list) %s",
673 dist
->list
[DISTRIBUTE_IN
] ? "," : "",
674 dist
->prefix
[DISTRIBUTE_IN
]);
675 vty_out (vty
, "%s", VTY_NEWLINE
);
678 vty_out (vty
, " Incoming update filter list for all interface is not set%s", VTY_NEWLINE
);
680 for (i
= 0; i
< disthash
->size
; i
++)
681 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
685 if (dist
->list
[DISTRIBUTE_IN
] || dist
->prefix
[DISTRIBUTE_IN
])
687 vty_out (vty
, " %s filtered by", dist
->ifname
);
688 if (dist
->list
[DISTRIBUTE_IN
])
689 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_IN
]);
690 if (dist
->prefix
[DISTRIBUTE_IN
])
691 vty_out (vty
, "%s (prefix-list) %s",
692 dist
->list
[DISTRIBUTE_IN
] ? "," : "",
693 dist
->prefix
[DISTRIBUTE_IN
]);
694 vty_out (vty
, "%s", VTY_NEWLINE
);
700 /* Configuration write function. */
702 config_write_distribute (struct vty
*vty
)
705 struct hash_backet
*mp
;
708 for (i
= 0; i
< disthash
->size
; i
++)
709 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
711 struct distribute
*dist
;
715 if (dist
->list
[DISTRIBUTE_IN
])
717 vty_out (vty
, " distribute-list %s in %s%s",
718 dist
->list
[DISTRIBUTE_IN
],
719 dist
->ifname
? dist
->ifname
: "",
724 if (dist
->list
[DISTRIBUTE_OUT
])
726 vty_out (vty
, " distribute-list %s out %s%s",
728 dist
->list
[DISTRIBUTE_OUT
],
729 dist
->ifname
? dist
->ifname
: "",
734 if (dist
->prefix
[DISTRIBUTE_IN
])
736 vty_out (vty
, " distribute-list prefix %s in %s%s",
737 dist
->prefix
[DISTRIBUTE_IN
],
738 dist
->ifname
? dist
->ifname
: "",
743 if (dist
->prefix
[DISTRIBUTE_OUT
])
745 vty_out (vty
, " distribute-list prefix %s out %s%s",
746 dist
->prefix
[DISTRIBUTE_OUT
],
747 dist
->ifname
? dist
->ifname
: "",
755 /* Clear all distribute list. */
757 distribute_list_reset ()
759 hash_clean (disthash
, (void (*) (void *)) distribute_free
);
762 /* Initialize distribute list related hash. */
764 distribute_list_init (int node
)
766 disthash
= hash_create (distribute_hash_make
,
767 (int (*) (const void *, const void *)) distribute_cmp
);
770 install_element (node
, &distribute_list_all_cmd
);
771 install_element (node
, &no_distribute_list_all_cmd
);
772 install_element (node
, &distribute_list_cmd
);
773 install_element (node
, &no_distribute_list_cmd
);
774 install_element (node
, &distribute_list_prefix_all_cmd
);
775 install_element (node
, &no_distribute_list_prefix_all_cmd
);
776 install_element (node
, &distribute_list_prefix_cmd
);
777 install_element (node
, &no_distribute_list_prefix_cmd
);
778 } else if (node
== RIPNG_NODE
) {
779 /* WARNING: two identical commands installed do a crash, so be worry with
781 install_element (node
, &ipv6_distribute_list_all_cmd
);
782 install_element (node
, &no_ipv6_distribute_list_all_cmd
);
783 install_element (node
, &ipv6_distribute_list_cmd
);
784 install_element (node
, &no_ipv6_distribute_list_cmd
);
785 install_element (node
, &ipv6_distribute_list_prefix_all_cmd
);
786 install_element (node
, &no_ipv6_distribute_list_prefix_all_cmd
);
787 install_element (node
, &ipv6_distribute_list_prefix_cmd
);
788 install_element (node
, &no_ipv6_distribute_list_prefix_cmd
);