summaryrefslogtreecommitdiff
path: root/lib/distribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/distribute.c')
-rw-r--r--lib/distribute.c69
1 files changed, 34 insertions, 35 deletions
diff --git a/lib/distribute.c b/lib/distribute.c
index 420849da..8d6f6377 100644
--- a/lib/distribute.c
+++ b/lib/distribute.c
@@ -299,7 +299,6 @@ DEFUN (distribute_list_all,
"Filter outgoing routing updates\n")
{
enum distribute_type type;
- struct distribute *dist;
/* Check of distribute list type. */
if (strncmp (argv[1], "i", 1) == 0)
@@ -314,7 +313,7 @@ DEFUN (distribute_list_all,
}
/* Get interface name corresponding distribute list. */
- dist = distribute_list_set (NULL, type, argv[0]);
+ distribute_list_set (NULL, type, argv[0]);
return CMD_SUCCESS;
}
@@ -379,7 +378,6 @@ DEFUN (distribute_list,
"Interface name\n")
{
enum distribute_type type;
- struct distribute *dist;
/* Check of distribute list type. */
if (strncmp (argv[1], "i", 1) == 0)
@@ -393,7 +391,7 @@ DEFUN (distribute_list,
}
/* Get interface name corresponding distribute list. */
- dist = distribute_list_set (argv[2], type, argv[0]);
+ distribute_list_set (argv[2], type, argv[0]);
return CMD_SUCCESS;
}
@@ -407,7 +405,7 @@ ALIAS (distribute_list,
"Filter outgoing routing updates\n"
"Interface name\n")
-DEFUN (no_districute_list, no_distribute_list_cmd,
+DEFUN (no_distribute_list, no_distribute_list_cmd,
"no distribute-list WORD (in|out) WORD",
NO_STR
"Filter networks in routing updates\n"
@@ -439,7 +437,7 @@ DEFUN (no_districute_list, no_distribute_list_cmd,
return CMD_SUCCESS;
}
-ALIAS (no_districute_list, no_ipv6_distribute_list_cmd,
+ALIAS (no_distribute_list, no_ipv6_distribute_list_cmd,
"no distribute-list WORD (in|out) WORD",
NO_STR
"Filter networks in routing updates\n"
@@ -448,7 +446,7 @@ ALIAS (no_districute_list, no_ipv6_distribute_list_cmd,
"Filter outgoing routing updates\n"
"Interface name\n")
-DEFUN (districute_list_prefix_all,
+DEFUN (distribute_list_prefix_all,
distribute_list_prefix_all_cmd,
"distribute-list prefix WORD (in|out)",
"Filter networks in routing updates\n"
@@ -458,7 +456,6 @@ DEFUN (districute_list_prefix_all,
"Filter outgoing routing updates\n")
{
enum distribute_type type;
- struct distribute *dist;
/* Check of distribute list type. */
if (strncmp (argv[1], "i", 1) == 0)
@@ -473,12 +470,12 @@ DEFUN (districute_list_prefix_all,
}
/* Get interface name corresponding distribute list. */
- dist = distribute_list_prefix_set (NULL, type, argv[0]);
+ distribute_list_prefix_set (NULL, type, argv[0]);
return CMD_SUCCESS;
}
-ALIAS (districute_list_prefix_all,
+ALIAS (distribute_list_prefix_all,
ipv6_distribute_list_prefix_all_cmd,
"distribute-list prefix WORD (in|out)",
"Filter networks in routing updates\n"
@@ -487,7 +484,7 @@ ALIAS (districute_list_prefix_all,
"Filter incoming routing updates\n"
"Filter outgoing routing updates\n")
-DEFUN (no_districute_list_prefix_all,
+DEFUN (no_distribute_list_prefix_all,
no_distribute_list_prefix_all_cmd,
"no distribute-list prefix WORD (in|out)",
NO_STR
@@ -521,7 +518,7 @@ DEFUN (no_districute_list_prefix_all,
return CMD_SUCCESS;
}
-ALIAS (no_districute_list_prefix_all,
+ALIAS (no_distribute_list_prefix_all,
no_ipv6_distribute_list_prefix_all_cmd,
"no distribute-list prefix WORD (in|out)",
NO_STR
@@ -531,7 +528,7 @@ ALIAS (no_districute_list_prefix_all,
"Filter incoming routing updates\n"
"Filter outgoing routing updates\n")
-DEFUN (districute_list_prefix, distribute_list_prefix_cmd,
+DEFUN (distribute_list_prefix, distribute_list_prefix_cmd,
"distribute-list prefix WORD (in|out) WORD",
"Filter networks in routing updates\n"
"Filter prefixes in routing updates\n"
@@ -541,7 +538,6 @@ DEFUN (districute_list_prefix, distribute_list_prefix_cmd,
"Interface name\n")
{
enum distribute_type type;
- struct distribute *dist;
/* Check of distribute list type. */
if (strncmp (argv[1], "i", 1) == 0)
@@ -556,12 +552,12 @@ DEFUN (districute_list_prefix, distribute_list_prefix_cmd,
}
/* Get interface name corresponding distribute list. */
- dist = distribute_list_prefix_set (argv[2], type, argv[0]);
+ distribute_list_prefix_set (argv[2], type, argv[0]);
return CMD_SUCCESS;
}
-ALIAS (districute_list_prefix, ipv6_distribute_list_prefix_cmd,
+ALIAS (distribute_list_prefix, ipv6_distribute_list_prefix_cmd,
"distribute-list prefix WORD (in|out) WORD",
"Filter networks in routing updates\n"
"Filter prefixes in routing updates\n"
@@ -570,7 +566,7 @@ ALIAS (districute_list_prefix, ipv6_distribute_list_prefix_cmd,
"Filter outgoing routing updates\n"
"Interface name\n")
-DEFUN (no_districute_list_prefix, no_distribute_list_prefix_cmd,
+DEFUN (no_distribute_list_prefix, no_distribute_list_prefix_cmd,
"no distribute-list prefix WORD (in|out) WORD",
NO_STR
"Filter networks in routing updates\n"
@@ -604,7 +600,7 @@ DEFUN (no_districute_list_prefix, no_distribute_list_prefix_cmd,
return CMD_SUCCESS;
}
-ALIAS (no_districute_list_prefix, no_ipv6_distribute_list_prefix_cmd,
+ALIAS (no_distribute_list_prefix, no_ipv6_distribute_list_prefix_cmd,
"no distribute-list prefix WORD (in|out) WORD",
NO_STR
"Filter networks in routing updates\n"
@@ -762,22 +758,25 @@ distribute_list_init (int node)
(int (*) (const void *, const void *)) distribute_cmp);
if(node==RIP_NODE) {
- install_element (RIP_NODE, &distribute_list_all_cmd);
- install_element (RIP_NODE, &no_distribute_list_all_cmd);
- install_element (RIP_NODE, &distribute_list_cmd);
- install_element (RIP_NODE, &no_distribute_list_cmd);
- install_element (RIP_NODE, &distribute_list_prefix_all_cmd);
- install_element (RIP_NODE, &no_distribute_list_prefix_all_cmd);
- install_element (RIP_NODE, &distribute_list_prefix_cmd);
- install_element (RIP_NODE, &no_distribute_list_prefix_cmd);
- } else {
- install_element (RIPNG_NODE, &ipv6_distribute_list_all_cmd);
- install_element (RIPNG_NODE, &no_ipv6_distribute_list_all_cmd);
- install_element (RIPNG_NODE, &ipv6_distribute_list_cmd);
- install_element (RIPNG_NODE, &no_ipv6_distribute_list_cmd);
- install_element (RIPNG_NODE, &ipv6_distribute_list_prefix_all_cmd);
- install_element (RIPNG_NODE, &no_ipv6_distribute_list_prefix_all_cmd);
- install_element (RIPNG_NODE, &ipv6_distribute_list_prefix_cmd);
- install_element (RIPNG_NODE, &no_ipv6_distribute_list_prefix_cmd);
+ install_element (node, &distribute_list_all_cmd);
+ install_element (node, &no_distribute_list_all_cmd);
+ install_element (node, &distribute_list_cmd);
+ install_element (node, &no_distribute_list_cmd);
+ install_element (node, &distribute_list_prefix_all_cmd);
+ install_element (node, &no_distribute_list_prefix_all_cmd);
+ install_element (node, &distribute_list_prefix_cmd);
+ install_element (node, &no_distribute_list_prefix_cmd);
+ } else if (node == RIPNG_NODE || node == BABEL_NODE) {
+ /* WARNING: two identical commands installed do a crash, so be worry with
+ aliases. For this reason, and because all these commands are aliases, Babel
+ is not set with RIP. */
+ install_element (node, &ipv6_distribute_list_all_cmd);
+ install_element (node, &no_ipv6_distribute_list_all_cmd);
+ install_element (node, &ipv6_distribute_list_cmd);
+ install_element (node, &no_ipv6_distribute_list_cmd);
+ install_element (node, &ipv6_distribute_list_prefix_all_cmd);
+ install_element (node, &no_ipv6_distribute_list_prefix_all_cmd);
+ install_element (node, &ipv6_distribute_list_prefix_cmd);
+ install_element (node, &no_ipv6_distribute_list_prefix_cmd);
}
}