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 DEFINE_MTYPE_STATIC(LIB
, DISTRIBUTE
, "Distribute list")
32 DEFINE_MTYPE_STATIC(LIB
, DISTRIBUTE_IFNAME
, "Dist-list ifname")
33 DEFINE_MTYPE_STATIC(LIB
, DISTRIBUTE_NAME
, "Dist-list name")
35 /* Hash of distribute list. */
36 struct hash
*disthash
;
39 void (*distribute_add_hook
) (struct distribute
*);
40 void (*distribute_delete_hook
) (struct distribute
*);
42 static struct distribute
*
45 return XCALLOC (MTYPE_DISTRIBUTE
, sizeof (struct distribute
));
48 /* Free distribute object. */
50 distribute_free (struct distribute
*dist
)
53 XFREE (MTYPE_DISTRIBUTE_IFNAME
, dist
->ifname
);
55 if (dist
->list
[DISTRIBUTE_IN
])
56 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
57 if (dist
->list
[DISTRIBUTE_OUT
])
58 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
60 if (dist
->prefix
[DISTRIBUTE_IN
])
61 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
62 if (dist
->prefix
[DISTRIBUTE_OUT
])
63 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
65 XFREE (MTYPE_DISTRIBUTE
, dist
);
68 /* Lookup interface's distribute list. */
70 distribute_lookup (const char *ifname
)
72 struct distribute key
;
73 struct distribute
*dist
;
75 /* temporary reference */
76 key
.ifname
= (ifname
) ? XSTRDUP(MTYPE_DISTRIBUTE_IFNAME
, ifname
) : NULL
;
78 dist
= hash_lookup (disthash
, &key
);
81 XFREE(MTYPE_DISTRIBUTE_IFNAME
, key
.ifname
);
87 distribute_list_add_hook (void (*func
) (struct distribute
*))
89 distribute_add_hook
= func
;
93 distribute_list_delete_hook (void (*func
) (struct distribute
*))
95 distribute_delete_hook
= func
;
99 distribute_hash_alloc (struct distribute
*arg
)
101 struct distribute
*dist
;
103 dist
= distribute_new ();
105 dist
->ifname
= XSTRDUP (MTYPE_DISTRIBUTE_IFNAME
, arg
->ifname
);
111 /* Make new distribute list and push into hash. */
112 static struct distribute
*
113 distribute_get (const char *ifname
)
115 struct distribute key
;
116 struct distribute
*ret
;
118 /* temporary reference */
119 key
.ifname
= (ifname
) ? XSTRDUP(MTYPE_DISTRIBUTE_IFNAME
, ifname
) : NULL
;
121 ret
= hash_get (disthash
, &key
, (void * (*) (void *))distribute_hash_alloc
);
124 XFREE(MTYPE_DISTRIBUTE_IFNAME
, key
.ifname
);
130 distribute_hash_make (void *arg
)
132 const struct distribute
*dist
= arg
;
134 return dist
->ifname
? string_hash_make (dist
->ifname
) : 0;
137 /* If two distribute-list have same value then return 1 else return
138 0. This function is used by hash package. */
140 distribute_cmp (const struct distribute
*dist1
, const struct distribute
*dist2
)
142 if (dist1
->ifname
&& dist2
->ifname
)
143 if (strcmp (dist1
->ifname
, dist2
->ifname
) == 0)
145 if (! dist1
->ifname
&& ! dist2
->ifname
)
150 /* Set access-list name to the distribute list. */
151 static struct distribute
*
152 distribute_list_set (const char *ifname
, enum distribute_type type
,
153 const char *alist_name
)
155 struct distribute
*dist
;
157 dist
= distribute_get (ifname
);
159 if (type
== DISTRIBUTE_IN
)
161 if (dist
->list
[DISTRIBUTE_IN
])
162 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
163 dist
->list
[DISTRIBUTE_IN
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, alist_name
);
165 if (type
== DISTRIBUTE_OUT
)
167 if (dist
->list
[DISTRIBUTE_OUT
])
168 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
169 dist
->list
[DISTRIBUTE_OUT
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, alist_name
);
172 /* Apply this distribute-list to the interface. */
173 (*distribute_add_hook
) (dist
);
178 /* Unset distribute-list. If matched distribute-list exist then
181 distribute_list_unset (const char *ifname
, enum distribute_type type
,
182 const char *alist_name
)
184 struct distribute
*dist
;
186 dist
= distribute_lookup (ifname
);
190 if (type
== DISTRIBUTE_IN
)
192 if (!dist
->list
[DISTRIBUTE_IN
])
194 if (strcmp (dist
->list
[DISTRIBUTE_IN
], alist_name
) != 0)
197 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_IN
]);
198 dist
->list
[DISTRIBUTE_IN
] = NULL
;
201 if (type
== DISTRIBUTE_OUT
)
203 if (!dist
->list
[DISTRIBUTE_OUT
])
205 if (strcmp (dist
->list
[DISTRIBUTE_OUT
], alist_name
) != 0)
208 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->list
[DISTRIBUTE_OUT
]);
209 dist
->list
[DISTRIBUTE_OUT
] = NULL
;
212 /* Apply this distribute-list to the interface. */
213 (*distribute_delete_hook
) (dist
);
215 /* If both out and in is NULL then free distribute list. */
216 if (dist
->list
[DISTRIBUTE_IN
] == NULL
&&
217 dist
->list
[DISTRIBUTE_OUT
] == NULL
&&
218 dist
->prefix
[DISTRIBUTE_IN
] == NULL
&&
219 dist
->prefix
[DISTRIBUTE_OUT
] == NULL
)
221 hash_release (disthash
, dist
);
222 distribute_free (dist
);
228 /* Set access-list name to the distribute list. */
229 static struct distribute
*
230 distribute_list_prefix_set (const char *ifname
, enum distribute_type type
,
231 const char *plist_name
)
233 struct distribute
*dist
;
235 dist
= distribute_get (ifname
);
237 if (type
== DISTRIBUTE_IN
)
239 if (dist
->prefix
[DISTRIBUTE_IN
])
240 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
241 dist
->prefix
[DISTRIBUTE_IN
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, plist_name
);
243 if (type
== DISTRIBUTE_OUT
)
245 if (dist
->prefix
[DISTRIBUTE_OUT
])
246 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
247 dist
->prefix
[DISTRIBUTE_OUT
] = XSTRDUP(MTYPE_DISTRIBUTE_NAME
, plist_name
);
250 /* Apply this distribute-list to the interface. */
251 (*distribute_add_hook
) (dist
);
256 /* Unset distribute-list. If matched distribute-list exist then
259 distribute_list_prefix_unset (const char *ifname
, enum distribute_type type
,
260 const char *plist_name
)
262 struct distribute
*dist
;
264 dist
= distribute_lookup (ifname
);
268 if (type
== DISTRIBUTE_IN
)
270 if (!dist
->prefix
[DISTRIBUTE_IN
])
272 if (strcmp (dist
->prefix
[DISTRIBUTE_IN
], plist_name
) != 0)
275 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_IN
]);
276 dist
->prefix
[DISTRIBUTE_IN
] = NULL
;
279 if (type
== DISTRIBUTE_OUT
)
281 if (!dist
->prefix
[DISTRIBUTE_OUT
])
283 if (strcmp (dist
->prefix
[DISTRIBUTE_OUT
], plist_name
) != 0)
286 XFREE(MTYPE_DISTRIBUTE_NAME
, dist
->prefix
[DISTRIBUTE_OUT
]);
287 dist
->prefix
[DISTRIBUTE_OUT
] = NULL
;
290 /* Apply this distribute-list to the interface. */
291 (*distribute_delete_hook
) (dist
);
293 /* If both out and in is NULL then free distribute list. */
294 if (dist
->list
[DISTRIBUTE_IN
] == NULL
&&
295 dist
->list
[DISTRIBUTE_OUT
] == NULL
&&
296 dist
->prefix
[DISTRIBUTE_IN
] == NULL
&&
297 dist
->prefix
[DISTRIBUTE_OUT
] == NULL
)
299 hash_release (disthash
, dist
);
300 distribute_free (dist
);
306 DEFUN (distribute_list_all
,
307 distribute_list_all_cmd
,
308 "distribute-list WORD (in|out)",
309 "Filter networks in routing updates\n"
311 "Filter incoming routing updates\n"
312 "Filter outgoing routing updates\n")
314 enum distribute_type type
;
316 /* Check of distribute list type. */
317 if (strncmp (argv
[1], "i", 1) == 0)
318 type
= DISTRIBUTE_IN
;
319 else if (strncmp (argv
[1], "o", 1) == 0)
320 type
= DISTRIBUTE_OUT
;
323 vty_out (vty
, "distribute list direction must be [in|out]%s",
328 /* Get interface name corresponding distribute list. */
329 distribute_list_set (NULL
, type
, argv
[0]);
334 ALIAS (distribute_list_all
,
335 ipv6_distribute_list_all_cmd
,
336 "distribute-list WORD (in|out)",
337 "Filter networks in routing updates\n"
339 "Filter incoming routing updates\n"
340 "Filter outgoing routing updates\n")
342 DEFUN (no_distribute_list_all
,
343 no_distribute_list_all_cmd
,
344 "no distribute-list WORD (in|out)",
346 "Filter networks in routing updates\n"
348 "Filter incoming routing updates\n"
349 "Filter outgoing routing updates\n")
352 enum distribute_type type
;
354 /* Check of distribute list type. */
355 if (strncmp (argv
[1], "i", 1) == 0)
356 type
= DISTRIBUTE_IN
;
357 else if (strncmp (argv
[1], "o", 1) == 0)
358 type
= DISTRIBUTE_OUT
;
361 vty_out (vty
, "distribute list direction must be [in|out]%s",
366 ret
= distribute_list_unset (NULL
, type
, argv
[0]);
369 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
375 ALIAS (no_distribute_list_all
,
376 no_ipv6_distribute_list_all_cmd
,
377 "no distribute-list WORD (in|out)",
379 "Filter networks in routing updates\n"
381 "Filter incoming routing updates\n"
382 "Filter outgoing routing updates\n")
384 DEFUN (distribute_list
,
386 "distribute-list WORD (in|out) WORD",
387 "Filter networks in routing updates\n"
389 "Filter incoming routing updates\n"
390 "Filter outgoing routing updates\n"
393 enum distribute_type type
;
395 /* Check of distribute list type. */
396 if (strncmp (argv
[1], "i", 1) == 0)
397 type
= DISTRIBUTE_IN
;
398 else if (strncmp (argv
[1], "o", 1) == 0)
399 type
= DISTRIBUTE_OUT
;
402 vty_out (vty
, "distribute list direction must be [in|out]%s", VTY_NEWLINE
);
406 /* Get interface name corresponding distribute list. */
407 distribute_list_set (argv
[2], type
, argv
[0]);
412 ALIAS (distribute_list
,
413 ipv6_distribute_list_cmd
,
414 "distribute-list WORD (in|out) WORD",
415 "Filter networks in routing updates\n"
417 "Filter incoming routing updates\n"
418 "Filter outgoing routing updates\n"
421 DEFUN (no_distribute_list
, no_distribute_list_cmd
,
422 "no distribute-list WORD (in|out) WORD",
424 "Filter networks in routing updates\n"
426 "Filter incoming routing updates\n"
427 "Filter outgoing routing updates\n"
431 enum distribute_type type
;
433 /* Check of distribute list type. */
434 if (strncmp (argv
[1], "i", 1) == 0)
435 type
= DISTRIBUTE_IN
;
436 else if (strncmp (argv
[1], "o", 1) == 0)
437 type
= DISTRIBUTE_OUT
;
440 vty_out (vty
, "distribute list direction must be [in|out]%s", VTY_NEWLINE
);
444 ret
= distribute_list_unset (argv
[2], type
, argv
[0]);
447 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
453 ALIAS (no_distribute_list
, no_ipv6_distribute_list_cmd
,
454 "no distribute-list WORD (in|out) WORD",
456 "Filter networks in routing updates\n"
458 "Filter incoming routing updates\n"
459 "Filter outgoing routing updates\n"
462 DEFUN (distribute_list_prefix_all
,
463 distribute_list_prefix_all_cmd
,
464 "distribute-list prefix WORD (in|out)",
465 "Filter networks in routing updates\n"
466 "Filter prefixes in routing updates\n"
467 "Name of an IP prefix-list\n"
468 "Filter incoming routing updates\n"
469 "Filter outgoing routing updates\n")
471 enum distribute_type type
;
473 /* Check of distribute list type. */
474 if (strncmp (argv
[1], "i", 1) == 0)
475 type
= DISTRIBUTE_IN
;
476 else if (strncmp (argv
[1], "o", 1) == 0)
477 type
= DISTRIBUTE_OUT
;
480 vty_out (vty
, "distribute list direction must be [in|out]%s",
485 /* Get interface name corresponding distribute list. */
486 distribute_list_prefix_set (NULL
, type
, argv
[0]);
491 ALIAS (distribute_list_prefix_all
,
492 ipv6_distribute_list_prefix_all_cmd
,
493 "distribute-list prefix WORD (in|out)",
494 "Filter networks in routing updates\n"
495 "Filter prefixes in routing updates\n"
496 "Name of an IP prefix-list\n"
497 "Filter incoming routing updates\n"
498 "Filter outgoing routing updates\n")
500 DEFUN (no_distribute_list_prefix_all
,
501 no_distribute_list_prefix_all_cmd
,
502 "no distribute-list prefix WORD (in|out)",
504 "Filter networks in routing updates\n"
505 "Filter prefixes in routing updates\n"
506 "Name of an IP prefix-list\n"
507 "Filter incoming routing updates\n"
508 "Filter outgoing routing updates\n")
511 enum distribute_type type
;
513 /* Check of distribute list type. */
514 if (strncmp (argv
[1], "i", 1) == 0)
515 type
= DISTRIBUTE_IN
;
516 else if (strncmp (argv
[1], "o", 1) == 0)
517 type
= DISTRIBUTE_OUT
;
520 vty_out (vty
, "distribute list direction must be [in|out]%s",
525 ret
= distribute_list_prefix_unset (NULL
, type
, argv
[0]);
528 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
534 ALIAS (no_distribute_list_prefix_all
,
535 no_ipv6_distribute_list_prefix_all_cmd
,
536 "no distribute-list prefix WORD (in|out)",
538 "Filter networks in routing updates\n"
539 "Filter prefixes in routing updates\n"
540 "Name of an IP prefix-list\n"
541 "Filter incoming routing updates\n"
542 "Filter outgoing routing updates\n")
544 DEFUN (distribute_list_prefix
, distribute_list_prefix_cmd
,
545 "distribute-list prefix WORD (in|out) WORD",
546 "Filter networks in routing updates\n"
547 "Filter prefixes in routing updates\n"
548 "Name of an IP prefix-list\n"
549 "Filter incoming routing updates\n"
550 "Filter outgoing routing updates\n"
553 enum distribute_type type
;
555 /* Check of distribute list type. */
556 if (strncmp (argv
[1], "i", 1) == 0)
557 type
= DISTRIBUTE_IN
;
558 else if (strncmp (argv
[1], "o", 1) == 0)
559 type
= DISTRIBUTE_OUT
;
562 vty_out (vty
, "distribute list direction must be [in|out]%s",
567 /* Get interface name corresponding distribute list. */
568 distribute_list_prefix_set (argv
[2], type
, argv
[0]);
573 ALIAS (distribute_list_prefix
, ipv6_distribute_list_prefix_cmd
,
574 "distribute-list prefix WORD (in|out) WORD",
575 "Filter networks in routing updates\n"
576 "Filter prefixes in routing updates\n"
577 "Name of an IP prefix-list\n"
578 "Filter incoming routing updates\n"
579 "Filter outgoing routing updates\n"
582 DEFUN (no_distribute_list_prefix
, no_distribute_list_prefix_cmd
,
583 "no distribute-list prefix WORD (in|out) WORD",
585 "Filter networks in routing updates\n"
586 "Filter prefixes in routing updates\n"
587 "Name of an IP prefix-list\n"
588 "Filter incoming routing updates\n"
589 "Filter outgoing routing updates\n"
593 enum distribute_type type
;
595 /* Check of distribute list type. */
596 if (strncmp (argv
[1], "i", 1) == 0)
597 type
= DISTRIBUTE_IN
;
598 else if (strncmp (argv
[1], "o", 1) == 0)
599 type
= DISTRIBUTE_OUT
;
602 vty_out (vty
, "distribute list direction must be [in|out]%s",
607 ret
= distribute_list_prefix_unset (argv
[2], type
, argv
[0]);
610 vty_out (vty
, "distribute list doesn't exist%s", VTY_NEWLINE
);
616 ALIAS (no_distribute_list_prefix
, no_ipv6_distribute_list_prefix_cmd
,
617 "no distribute-list prefix WORD (in|out) WORD",
619 "Filter networks in routing updates\n"
620 "Filter prefixes in routing updates\n"
621 "Name of an IP prefix-list\n"
622 "Filter incoming routing updates\n"
623 "Filter outgoing routing updates\n"
627 config_show_distribute (struct vty
*vty
)
630 struct hash_backet
*mp
;
631 struct distribute
*dist
;
633 /* Output filter configuration. */
634 dist
= distribute_lookup (NULL
);
635 if (dist
&& (dist
->list
[DISTRIBUTE_OUT
] || dist
->prefix
[DISTRIBUTE_OUT
]))
637 vty_out (vty
, " Outgoing update filter list for all interface is");
638 if (dist
->list
[DISTRIBUTE_OUT
])
639 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_OUT
]);
640 if (dist
->prefix
[DISTRIBUTE_OUT
])
641 vty_out (vty
, "%s (prefix-list) %s",
642 dist
->list
[DISTRIBUTE_OUT
] ? "," : "",
643 dist
->prefix
[DISTRIBUTE_OUT
]);
644 vty_out (vty
, "%s", VTY_NEWLINE
);
647 vty_out (vty
, " Outgoing update filter list for all interface is not set%s", VTY_NEWLINE
);
649 for (i
= 0; i
< disthash
->size
; i
++)
650 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
654 if (dist
->list
[DISTRIBUTE_OUT
] || dist
->prefix
[DISTRIBUTE_OUT
])
656 vty_out (vty
, " %s filtered by", dist
->ifname
);
657 if (dist
->list
[DISTRIBUTE_OUT
])
658 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_OUT
]);
659 if (dist
->prefix
[DISTRIBUTE_OUT
])
660 vty_out (vty
, "%s (prefix-list) %s",
661 dist
->list
[DISTRIBUTE_OUT
] ? "," : "",
662 dist
->prefix
[DISTRIBUTE_OUT
]);
663 vty_out (vty
, "%s", VTY_NEWLINE
);
668 /* Input filter configuration. */
669 dist
= distribute_lookup (NULL
);
670 if (dist
&& (dist
->list
[DISTRIBUTE_IN
] || dist
->prefix
[DISTRIBUTE_IN
]))
672 vty_out (vty
, " Incoming update filter list for all interface is");
673 if (dist
->list
[DISTRIBUTE_IN
])
674 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_IN
]);
675 if (dist
->prefix
[DISTRIBUTE_IN
])
676 vty_out (vty
, "%s (prefix-list) %s",
677 dist
->list
[DISTRIBUTE_IN
] ? "," : "",
678 dist
->prefix
[DISTRIBUTE_IN
]);
679 vty_out (vty
, "%s", VTY_NEWLINE
);
682 vty_out (vty
, " Incoming update filter list for all interface is not set%s", VTY_NEWLINE
);
684 for (i
= 0; i
< disthash
->size
; i
++)
685 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
689 if (dist
->list
[DISTRIBUTE_IN
] || dist
->prefix
[DISTRIBUTE_IN
])
691 vty_out (vty
, " %s filtered by", dist
->ifname
);
692 if (dist
->list
[DISTRIBUTE_IN
])
693 vty_out (vty
, " %s", dist
->list
[DISTRIBUTE_IN
]);
694 if (dist
->prefix
[DISTRIBUTE_IN
])
695 vty_out (vty
, "%s (prefix-list) %s",
696 dist
->list
[DISTRIBUTE_IN
] ? "," : "",
697 dist
->prefix
[DISTRIBUTE_IN
]);
698 vty_out (vty
, "%s", VTY_NEWLINE
);
704 /* Configuration write function. */
706 config_write_distribute (struct vty
*vty
)
709 struct hash_backet
*mp
;
712 for (i
= 0; i
< disthash
->size
; i
++)
713 for (mp
= disthash
->index
[i
]; mp
; mp
= mp
->next
)
715 struct distribute
*dist
;
719 if (dist
->list
[DISTRIBUTE_IN
])
721 vty_out (vty
, " distribute-list %s in %s%s",
722 dist
->list
[DISTRIBUTE_IN
],
723 dist
->ifname
? dist
->ifname
: "",
728 if (dist
->list
[DISTRIBUTE_OUT
])
730 vty_out (vty
, " distribute-list %s out %s%s",
732 dist
->list
[DISTRIBUTE_OUT
],
733 dist
->ifname
? dist
->ifname
: "",
738 if (dist
->prefix
[DISTRIBUTE_IN
])
740 vty_out (vty
, " distribute-list prefix %s in %s%s",
741 dist
->prefix
[DISTRIBUTE_IN
],
742 dist
->ifname
? dist
->ifname
: "",
747 if (dist
->prefix
[DISTRIBUTE_OUT
])
749 vty_out (vty
, " distribute-list prefix %s out %s%s",
750 dist
->prefix
[DISTRIBUTE_OUT
],
751 dist
->ifname
? dist
->ifname
: "",
759 /* Clear all distribute list. */
761 distribute_list_reset ()
763 hash_clean (disthash
, (void (*) (void *)) distribute_free
);
766 /* Initialize distribute list related hash. */
768 distribute_list_init (int node
)
770 disthash
= hash_create (distribute_hash_make
,
771 (int (*) (const void *, const void *)) distribute_cmp
);
774 install_element (node
, &distribute_list_all_cmd
);
775 install_element (node
, &no_distribute_list_all_cmd
);
776 install_element (node
, &distribute_list_cmd
);
777 install_element (node
, &no_distribute_list_cmd
);
778 install_element (node
, &distribute_list_prefix_all_cmd
);
779 install_element (node
, &no_distribute_list_prefix_all_cmd
);
780 install_element (node
, &distribute_list_prefix_cmd
);
781 install_element (node
, &no_distribute_list_prefix_cmd
);
782 } else if (node
== RIPNG_NODE
) {
783 /* WARNING: two identical commands installed do a crash, so be worry with
785 install_element (node
, &ipv6_distribute_list_all_cmd
);
786 install_element (node
, &no_ipv6_distribute_list_all_cmd
);
787 install_element (node
, &ipv6_distribute_list_cmd
);
788 install_element (node
, &no_ipv6_distribute_list_cmd
);
789 install_element (node
, &ipv6_distribute_list_prefix_all_cmd
);
790 install_element (node
, &no_ipv6_distribute_list_prefix_all_cmd
);
791 install_element (node
, &ipv6_distribute_list_prefix_cmd
);
792 install_element (node
, &no_ipv6_distribute_list_prefix_cmd
);