summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_topology.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-08-23 01:48:23 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-08-24 14:04:20 +0200
commit5ca6df7822a8cddd1a10b27760f6b6e274aced5d (patch)
tree1c34cec265e2e23e1b42d60e11cc0ae3ea317a0b /eigrpd/eigrp_topology.c
parenteigrpd: Remove union from FSM msg (diff)
downloadfrr-5ca6df7822a8cddd1a10b27760f6b6e274aced5d.tar.xz
frr-5ca6df7822a8cddd1a10b27760f6b6e274aced5d.zip
eigrpd: No need to create TLV type
There is no need to create a TLV type to pass in for the FSM message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_topology.c')
-rw-r--r--eigrpd/eigrp_topology.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c
index 4555ced47..3ba8c5b5f 100644
--- a/eigrpd/eigrp_topology.c
+++ b/eigrpd/eigrp_topology.c
@@ -497,20 +497,19 @@ void eigrp_topology_neighbor_down(struct eigrp *eigrp,
for (ALL_LIST_ELEMENTS(eigrp->topology_table, node1, node11, prefix)) {
for (ALL_LIST_ELEMENTS(prefix->entries, node2, node22, entry)) {
- if (entry->adv_router == nbr) {
- struct eigrp_fsm_action_message msg;
- struct TLV_IPv4_Internal_type *tlv =
- eigrp_IPv4_InternalTLV_new();
- tlv->metric.delay = EIGRP_MAX_METRIC;
- msg.packet_type = EIGRP_OPC_UPDATE;
- msg.eigrp = eigrp;
- msg.data_type = EIGRP_INT;
- msg.adv_router = nbr;
- msg.metrics = tlv->metric;
- msg.entry = entry;
- msg.prefix = prefix;
- eigrp_fsm_event(&msg);
- }
+ struct eigrp_fsm_action_message msg;
+
+ if (entry->adv_router != nbr)
+ continue;
+
+ msg.metrics.delay = EIGRP_MAX_METRIC;
+ msg.packet_type = EIGRP_OPC_UPDATE;
+ msg.eigrp = eigrp;
+ msg.data_type = EIGRP_INT;
+ msg.adv_router = nbr;
+ msg.entry = entry;
+ msg.prefix = prefix;
+ eigrp_fsm_event(&msg);
}
}