diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-27 14:25:29 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-27 14:25:29 -0700 |
commit | ea01b56bc3f43b268d32d175095a2a930d3b2967 (patch) | |
tree | e3e11bc827541bc983105a731636a78bc30bb5fa /ripd/ripd.c | |
parent | 0eb78a78cffc4a5c13e2b5daff5fa257b3f1d8d6 (diff) | |
parent | d3e384e4f00aa90db4310f82f3cbe6528e256334 (diff) | |
download | quagga-ea01b56bc3f43b268d32d175095a2a930d3b2967.tar.bz2 quagga-ea01b56bc3f43b268d32d175095a2a930d3b2967.tar.xz |
Merge in latest quagga (0.99.11)
Merge in current upstream version of quagga.
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r-- | ripd/ripd.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index fc8ce1b8..2525679c 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -112,7 +112,11 @@ rip_route_rte (struct rip_info *rinfo) static struct rip_info * rip_info_new () { - return XCALLOC (MTYPE_RIP_INFO, sizeof (struct rip_info)); + struct rip_info *new; + + new = XMALLOC (MTYPE_RIP_INFO, sizeof (struct rip_info)); + memset (new, 0, sizeof (struct rip_info)); + return new; } void @@ -2693,7 +2697,8 @@ rip_redistribute_withdraw (int type) static int rip_create (void) { - rip = XCALLOC (MTYPE_RIP, sizeof (struct rip)); + rip = XMALLOC (MTYPE_RIP, sizeof (struct rip)); + memset (rip, 0, sizeof (struct rip)); /* Set initial value. */ rip->version_send = RI_RIP_VERSION_2; @@ -2973,7 +2978,6 @@ DEFUN (no_rip_route, return CMD_SUCCESS; } -#if 0 static void rip_update_default_metric (void) { @@ -2985,7 +2989,6 @@ rip_update_default_metric (void) if (rinfo->type != ZEBRA_ROUTE_RIP && rinfo->type != ZEBRA_ROUTE_CONNECT) rinfo->metric = rip->default_metric; } -#endif DEFUN (rip_default_metric, rip_default_metric_cmd, @@ -3114,7 +3117,10 @@ struct rip_distance static struct rip_distance * rip_distance_new (void) { - return XCALLOC (MTYPE_RIP_DISTANCE, sizeof (struct rip_distance)); + struct rip_distance *new; + new = XMALLOC (MTYPE_RIP_DISTANCE, sizeof (struct rip_distance)); + memset (new, 0, sizeof (struct rip_distance)); + return new; } static void @@ -3682,7 +3688,7 @@ config_write_rip (struct vty *vty) } /* RIP node structure. */ -static struct cmd_node rip_node = +struct cmd_node rip_node = { RIP_NODE, "%s(config-router)# ", |