]> git.proxmox.com Git - mirror_frr.git/blobdiff - eigrpd/eigrp_interface.c
doc: add comment on PR title and description
[mirror_frr.git] / eigrpd / eigrp_interface.c
index 2897e262c9279092f616644cf84cbdd64a8cb84f..cd62811fdfdadf34da3698590019f8974155b998 100644 (file)
@@ -320,7 +320,7 @@ void eigrp_if_set_multicast(struct eigrp_interface *ei)
        }
 }
 
-u_char eigrp_default_iftype(struct interface *ifp)
+uint8_t eigrp_default_iftype(struct interface *ifp)
 {
        if (if_is_pointopoint(ifp))
                return EIGRP_IFTYPE_POINTOPOINT;
@@ -336,6 +336,9 @@ void eigrp_if_free(struct eigrp_interface *ei, int source)
        struct eigrp_prefix_entry *pe;
        struct eigrp *eigrp = eigrp_lookup();
 
+       if (!eigrp)
+               return;
+
        if (source == INTERFACE_DOWN_BY_VTY) {
                THREAD_OFF(ei->t_hello);
                eigrp_hello_send(ei, EIGRP_HELLO_GRACEFUL_SHUTDOWN, NULL);
@@ -413,32 +416,32 @@ struct eigrp_interface *eigrp_if_lookup_by_name(struct eigrp *eigrp,
        return NULL;
 }
 
-u_int32_t eigrp_bandwidth_to_scaled(u_int32_t bandwidth)
+uint32_t eigrp_bandwidth_to_scaled(uint32_t bandwidth)
 {
        uint64_t temp_bandwidth = (256ull * 10000000) / bandwidth;
 
        temp_bandwidth = temp_bandwidth < EIGRP_MAX_METRIC ? temp_bandwidth
                                                           : EIGRP_MAX_METRIC;
 
-       return (u_int32_t)temp_bandwidth;
+       return (uint32_t)temp_bandwidth;
 }
 
-u_int32_t eigrp_scaled_to_bandwidth(u_int32_t scaled)
+uint32_t eigrp_scaled_to_bandwidth(uint32_t scaled)
 {
        uint64_t temp_scaled = scaled * (256ull * 10000000);
 
        temp_scaled =
                temp_scaled < EIGRP_MAX_METRIC ? temp_scaled : EIGRP_MAX_METRIC;
 
-       return (u_int32_t)temp_scaled;
+       return (uint32_t)temp_scaled;
 }
 
-u_int32_t eigrp_delay_to_scaled(u_int32_t delay)
+uint32_t eigrp_delay_to_scaled(uint32_t delay)
 {
        return delay * 256;
 }
 
-u_int32_t eigrp_scaled_to_delay(u_int32_t scaled)
+uint32_t eigrp_scaled_to_delay(uint32_t scaled)
 {
        return scaled / 256;
 }