summaryrefslogtreecommitdiffstats
path: root/ripd/rip_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r--ripd/rip_interface.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index b6d9240f..131898c2 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -50,11 +50,12 @@ static int rip_enable_if_lookup (const char *ifname);
static int rip_enable_network_lookup2 (struct connected *connected);
static void rip_enable_apply_all (void);
-struct message ri_version_msg[] =
+const struct message ri_version_msg[] =
{
{RI_RIP_VERSION_1, "1"},
{RI_RIP_VERSION_2, "2"},
{RI_RIP_VERSION_1_AND_2, "1 2"},
+ {0, NULL}
};
extern struct zebra_privs_t ripd_privs;
@@ -118,8 +119,7 @@ rip_interface_new (void)
{
struct rip_interface *ri;
- ri = XMALLOC (MTYPE_RIP_INTERFACE, sizeof (struct rip_interface));
- memset (ri, 0, sizeof (struct rip_interface));
+ ri = XCALLOC (MTYPE_RIP_INTERFACE, sizeof (struct rip_interface));
/* Default authentication type is simple password for Cisco
compatibility. */
@@ -240,6 +240,7 @@ rip_request_interface (struct interface *ifp)
}
}
+#if 0
/* Send RIP request to the neighbor. */
static void
rip_request_neighbor (struct in_addr addr)
@@ -270,6 +271,7 @@ rip_request_neighbor_all (void)
if (rp->info)
rip_request_neighbor (rp->p.u.prefix4);
}
+#endif
/* Multicast packet receive socket. */
static int
@@ -403,8 +405,9 @@ rip_interface_down (int command, struct zclient *zclient, zebra_size_t length)
rip_if_down(ifp);
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is down",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is down",
+ ifp->name, ifp->ifindex,
+ (unsigned long long) ifp->flags, ifp->metric, ifp->mtu);
return 0;
}
@@ -423,8 +426,9 @@ rip_interface_up (int command, struct zclient *zclient, zebra_size_t length)
return 0;
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface %s index %d flags %ld metric %d mtu %d is up",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface %s index %d flags %#llx metric %d mtu %d is up",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu);
/* Check if this interface is RIP enabled or not.*/
rip_enable_apply (ifp);
@@ -447,8 +451,9 @@ rip_interface_add (int command, struct zclient *zclient, zebra_size_t length)
ifp = zebra_interface_add_read (zclient->ibuf);
if (IS_RIP_DEBUG_ZEBRA)
- zlog_debug ("interface add %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_debug ("interface add %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu);
/* Check if this interface is RIP enabled or not.*/
rip_enable_apply (ifp);
@@ -486,8 +491,9 @@ rip_interface_delete (int command, struct zclient *zclient,
rip_if_down(ifp);
}
- zlog_info("interface delete %s index %d flags %ld metric %d mtu %d",
- ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
+ zlog_info("interface delete %s index %d flags %#llx metric %d mtu %d",
+ ifp->name, ifp->ifindex, (unsigned long long) ifp->flags,
+ ifp->metric, ifp->mtu);
/* To support pseudo interface do not free interface structure. */
/* if_delete(ifp); */
@@ -2052,7 +2058,7 @@ config_write_rip_network (struct vty *vty, int config_mode)
return 0;
}
-struct cmd_node interface_node =
+static struct cmd_node interface_node =
{
INTERFACE_NODE,
"%s(config-if)# ",