RIP has now "route-map x [in|out] <interface>" as well.

This commit is contained in:
hasso 2003-05-25 15:13:49 +00:00
parent 16705130a1
commit 4f84947985
2 changed files with 31 additions and 5 deletions

View File

@ -221,6 +221,15 @@ DEFUN (if_rmap,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
ALIAS (if_rmap,
if_ipv6_rmap_cmd,
"route-map RMAP_NAME (in|out) IFNAME",
"Route map set\n"
"Route map name\n"
"Route map set for input filtering\n"
"Route map set for output filtering\n"
"Route map interface name\n")
DEFUN (no_if_rmap, DEFUN (no_if_rmap,
no_if_rmap_cmd, no_if_rmap_cmd,
"no route-map ROUTEMAP_NAME (in|out) IFNAME", "no route-map ROUTEMAP_NAME (in|out) IFNAME",
@ -252,6 +261,16 @@ DEFUN (no_if_rmap,
} }
return CMD_SUCCESS; return CMD_SUCCESS;
} }
ALIAS (no_if_rmap,
no_if_ipv6_rmap_cmd,
"no route-map ROUTEMAP_NAME (in|out) IFNAME",
NO_STR
"Route map unset\n"
"Route map name\n"
"Route map for input filtering\n"
"Route map for output filtering\n"
"Route map interface name\n")
/* Configuration write function. */ /* Configuration write function. */
int int
@ -300,7 +319,10 @@ if_rmap_init (int node)
{ {
ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp); ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp);
if (node == RIPNG_NODE) { if (node == RIPNG_NODE) {
install_element (RIPNG_NODE, &if_rmap_cmd); install_element (RIPNG_NODE, &if_ipv6_rmap_cmd);
install_element (RIPNG_NODE, &no_if_rmap_cmd); install_element (RIPNG_NODE, &no_if_ipv6_rmap_cmd);
} else if (node == RIP_NODE) {
install_element (RIP_NODE, &if_rmap_cmd);
install_element (RIP_NODE, &no_if_rmap_cmd);
} }
} }

View File

@ -109,7 +109,11 @@ foreach (@ARGV) {
} }
} }
if ($file =~ /if_rmap.c/) { if ($file =~ /if_rmap.c/) {
if ($defun_array[1] =~ m/ipv6/) {
$protocol = "VTYSH_RIPNGD"; $protocol = "VTYSH_RIPNGD";
} else {
$protocol = "VTYSH_RIPD";
}
} }
} else { } else {
($protocol) = ($file =~ /\/([a-z0-9]+)/); ($protocol) = ($file =~ /\/([a-z0-9]+)/);