#include "eigrpd/eigrp_fsm.h"
#include "eigrpd/eigrp_memory.h"
-u_int32_t eigrp_query_send_all(struct eigrp *eigrp)
+uint32_t eigrp_query_send_all(struct eigrp *eigrp)
{
struct eigrp_interface *iface;
struct listnode *node, *node2, *nnode2;
struct eigrp_prefix_entry *pe;
- u_int32_t counter;
+ uint32_t counter;
if (eigrp == NULL) {
zlog_debug("EIGRP Routing Process not enabled");
struct TLV_IPv4_Internal_type *tlv;
struct prefix dest_addr;
- u_int16_t type;
- u_int16_t length;
+ uint16_t type;
+ uint16_t length;
/* increment statistics. */
ei->query_in++;
type = stream_getw(s);
switch (type) {
case EIGRP_TLV_IPv4_INT:
- stream_set_getp(s, s->getp - sizeof(u_int16_t));
+ stream_set_getp(s, s->getp - sizeof(uint16_t));
tlv = eigrp_read_ipv4_tlv(s);
void eigrp_send_query(struct eigrp_interface *ei)
{
struct eigrp_packet *ep = NULL;
- u_int16_t length = EIGRP_HEADER_LEN;
+ uint16_t length = EIGRP_HEADER_LEN;
struct listnode *node, *nnode, *node2, *nnode2;
struct eigrp_neighbor *nbr;
struct eigrp_prefix_entry *pe;
bool has_tlv = false;
bool new_packet = true;
+ uint16_t eigrp_mtu = EIGRP_PACKET_MTU(ei->ifp->mtu);
for (ALL_LIST_ELEMENTS(ei->eigrp->topology_changes_internalIPV4, node,
nnode, pe)) {
continue;
if (new_packet) {
- ep = eigrp_packet_new(ei->ifp->mtu, NULL);
+ ep = eigrp_packet_new(eigrp_mtu, NULL);
/* Prepare EIGRP INIT UPDATE header */
eigrp_packet_header_init(EIGRP_OPC_QUERY, ei->eigrp,
listnode_add(pe->rij, nbr);
}
- if (length + EIGRP_TLV_MAX_IPV4_BYTE > (uint16_t)ei->ifp->mtu) {
+ if (length + EIGRP_TLV_MAX_IPV4_BYTE > eigrp_mtu) {
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& ei->params.auth_keychain != NULL) {
eigrp_make_md5_digest(ei, ep->s,
}
}
- if (!has_tlv) {
- if (ep)
- eigrp_packet_free(ep);
+ if (!has_tlv)
return;
- }
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& ei->params.auth_keychain != NULL)