summaryrefslogtreecommitdiff
path: root/eigrpd/eigrp_network.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-12-30 19:54:25 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-12-30 19:55:50 -0500
commit900e2d42cfea6c2b21d9c737098a94799a5d96f1 (patch)
tree0f5935d419987fc48ce6699fea00d7ee04a749e0 /eigrpd/eigrp_network.c
parente7c0d8c234d533555d211e82d341995d21e857be (diff)
eigrpd: eigrp usage of uint32_t to struct in_addr for router_id data
In eigrp we were using a uint32_t to hold the `struct in_addr` data for the router id values. This caused us to do unnecessary conversions pre and post for in/out. Let's just use the standard `struct in_addr` Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_network.c')
-rw-r--r--eigrpd/eigrp_network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index 35b45288b8..6bb619f0e1 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -227,7 +227,7 @@ int eigrp_network_set(struct eigrp *eigrp, struct prefix *p)
rn->info = (void *)pref;
/* Schedule Router ID Update. */
- if (eigrp->router_id == 0)
+ if (eigrp->router_id.s_addr == 0)
eigrp_router_id_update(eigrp);
/* Run network config now. */
/* Get target interface. */
@@ -293,7 +293,7 @@ void eigrp_if_update(struct interface *ifp)
*/
for (ALL_LIST_ELEMENTS(eigrp_om->eigrp, node, nnode, eigrp)) {
/* EIGRP must be on and Router-ID must be configured. */
- if (!eigrp || eigrp->router_id == 0)
+ if (!eigrp || eigrp->router_id.s_addr == 0)
continue;
/* Run each network for this interface. */