summaryrefslogtreecommitdiff
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index bdae2c5ef5..a2c86e3b22 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -160,7 +160,7 @@ static void rip_request_interface_send(struct interface *ifp, uint8_t version)
* destination addr */
to.sin_addr = connected->destination->u.prefix4;
else if (connected->address->prefixlen
- < IPV4_MAX_PREFIXLEN)
+ < IPV4_MAX_BITLEN)
/* calculate the appropriate broadcast
* address */
to.sin_addr.s_addr = ipv4_broadcast_addr(
@@ -1156,15 +1156,6 @@ int rip_show_network_config(struct vty *vty, struct rip *rip)
return 0;
}
-static int rip_interface_config_write(struct vty *vty);
-static struct cmd_node interface_node = {
- .name = "interface",
- .node = INTERFACE_NODE,
- .parent_node = CONFIG_NODE,
- .prompt = "%s(config-if)# ",
- .config_write = rip_interface_config_write,
-};
-
void rip_interface_sync(struct interface *ifp)
{
struct vrf *vrf;
@@ -1204,8 +1195,7 @@ void rip_if_init(void)
hook_register_prio(if_del, 0, rip_interface_delete_hook);
/* Install interface node. */
- install_node(&interface_node);
- if_cmd_init();
+ if_cmd_init(rip_interface_config_write);
if_zapi_callbacks(rip_ifp_create, rip_ifp_up,
rip_ifp_down, rip_ifp_destroy);
}