diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2025-03-24 08:07:02 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2025-03-24 11:36:13 -0400 | 
| commit | efb2aeae7b0d565f919bcd77345b78a9bd91e297 (patch) | |
| tree | 2936d4d76bd210d0ac2de7dcc3c3c4397bf6f0bc /eigrpd/eigrp_update.c | |
| parent | 95e7f56eec5797a9e6d46d91441d611592b952cf (diff) | |
eigrpd: Cleanup memory issues on shutdown
a) EIGRP was having issues with the prefix created as part
of the topology destination.  Make this just a part of the
topology data structure instead of allocating it.
b) EIGRP was not freeing up any memory associated with
the network table.  Free it.
c) EIGRP was confusing zebra shutdown as part of the deletion
of the last eigrp data structure.  This was inappropriate it
should be part of the `I'm just shutting down`.
d) The QOBJ was not being properly freed, free it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'eigrpd/eigrp_update.c')
| -rw-r--r-- | eigrpd/eigrp_update.c | 13 | 
1 files changed, 5 insertions, 8 deletions
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 6511db2feb..7348231c3b 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -128,8 +128,7 @@ static void eigrp_update_receive_GR_ask(struct eigrp *eigrp,  	/* iterate over all prefixes which weren't advertised by neighbor */  	for (ALL_LIST_ELEMENTS_RO(nbr_prefixes, node1, prefix)) { -		zlog_debug("GR receive: Neighbor not advertised %pFX", -			   prefix->destination); +		zlog_debug("GR receive: Neighbor not advertised %pFX", &prefix->destination);  		fsm_msg.metrics = prefix->reported_metric;  		/* set delay to MAX */ @@ -320,9 +319,7 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,  				/*Here comes topology information save*/  				pe = eigrp_prefix_descriptor_new();  				pe->serno = eigrp->serno; -				pe->destination = -					(struct prefix *)prefix_ipv4_new(); -				prefix_copy(pe->destination, &dest_addr); +				prefix_copy(&pe->destination, &dest_addr);  				pe->af = AF_INET;  				pe->state = EIGRP_FSM_STATE_PASSIVE;  				pe->nt = EIGRP_TOPOLOGY_TYPE_REMOTE; @@ -566,7 +563,7 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)  				}  			}  			/* Get destination address from prefix */ -			dest_addr = pe->destination; +			dest_addr = &pe->destination;  			/* Check if any list fits */  			if (eigrp_update_prefix_apply( @@ -650,7 +647,7 @@ void eigrp_update_send(struct eigrp_interface *ei)  			has_tlv = 0;  		}  		/* Get destination address from prefix */ -		dest_addr = pe->destination; +		dest_addr = &pe->destination;  		if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,  					      dest_addr)) { @@ -798,7 +795,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)  		/*  		 * Filtering  		 */ -		dest_addr = pe->destination; +		dest_addr = &pe->destination;  		if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,  					      dest_addr)) {  | 
