diff options
| author | Joakim Tjernlund <Joakim.Tjernlund@transmode.se> | 2009-08-07 13:48:15 +0200 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-08-18 07:35:39 -0400 |
| commit | 953cde65c5a35c8762f5858ace216b768814d01c (patch) | |
| tree | acf13ca7ac43984b9215b0006d4d16fac2c281c3 /ospfd/ospf_vty.c | |
| parent | 2c494df3fa14e55ab1c909619b55b73853804f55 (diff) | |
ospfd: Impl. per interface 'ip ospf area' command
Use with interface command:
interface ppp0
ip ospf area 0.0.0.0
This will enable OSPF on ppp0 with area 0.0.0.0
Remove with "no ip ospf area"
* ospf_vty.c: add "ip ospf area (A.B.C.D|<0-4294967295>)" interface command
* ospfd.c: (ospf_interface_{un,}set) new helper function to enable/disable
OSPF on a specific interface.
(ospf_if_update) 2 possible paths now to deal with interface updates.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: this restores the tree to deccaf9...]
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index ea76856afe..3022a316c6 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -543,6 +543,13 @@ DEFUN (ospf_network_area, return CMD_WARNING; } + if (ospf->if_ospf_cli_count > 0) + { + vty_out (vty, "Please remove all ip ospf area x.x.x.x commands first.%s", + VTY_NEWLINE); + return CMD_WARNING; + } + /* Get network prefix and Area ID. */ VTY_GET_IPV4_PREFIX ("network prefix", p, argv[0]); VTY_GET_OSPF_AREA_ID (area_id, format, argv[1]); @@ -9403,6 +9410,18 @@ config_write_interface (struct vty *vty) vty_out (vty, "%s", VTY_NEWLINE); } + /* Area print. */ + if (OSPF_IF_PARAM_CONFIGURED (params, if_area)) + { + if (ospf->instance) + vty_out (vty, " ip ospf %d area %s%s", ospf->instance, + inet_ntoa (params->if_area), VTY_NEWLINE); + else + vty_out (vty, " ip ospf area %s%s", + inet_ntoa (params->if_area), VTY_NEWLINE); + + } + /* bfd print. */ ospf_bfd_write_config(vty, params); @@ -10133,6 +10152,14 @@ ospf_vty_if_init (void) install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_sec_addr_cmd); install_element (INTERFACE_NODE, &no_ip_ospf_transmit_delay_sec_cmd); + /* "ip ospf area" commands. */ + install_element (INTERFACE_NODE, &ip_ospf_area_cmd); + install_element (INTERFACE_NODE, &no_ip_ospf_area_cmd); + install_element (INTERFACE_NODE, &no_ip_ospf_area_val_cmd); + install_element (INTERFACE_NODE, &ip_ospf_instance_area_cmd); + install_element (INTERFACE_NODE, &no_ip_ospf_instance_area_cmd); + install_element (INTERFACE_NODE, &no_ip_ospf_instance_area_val_cmd); + /* These commands are compatibitliy for previous version. */ install_element (INTERFACE_NODE, &ospf_authentication_key_cmd); install_element (INTERFACE_NODE, &no_ospf_authentication_key_cmd); |
