summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-03-06 20:02:52 +0100
committerLou Berger <lberger@labn.net>2018-03-06 20:04:32 +0100
commit996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch)
tree2b28846d256c84cf7b7f1a8988fb3267c8611722 /eigrpd
parentbgpd: another change to keep indent.py happy (diff)
downloadfrr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.tar.xz
frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.zip
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_const.h8
-rw-r--r--eigrpd/eigrp_dump.c11
-rw-r--r--eigrpd/eigrp_dump.h2
-rw-r--r--eigrpd/eigrp_fsm.c38
-rw-r--r--eigrpd/eigrp_hello.c15
-rw-r--r--eigrpd/eigrp_interface.c12
-rw-r--r--eigrpd/eigrp_macros.h1
-rw-r--r--eigrpd/eigrp_neighbor.c3
-rw-r--r--eigrpd/eigrp_network.c15
-rw-r--r--eigrpd/eigrp_packet.c47
-rw-r--r--eigrpd/eigrp_packet.h8
-rw-r--r--eigrpd/eigrp_query.c17
-rw-r--r--eigrpd/eigrp_reply.c18
-rw-r--r--eigrpd/eigrp_routemap.h3
-rw-r--r--eigrpd/eigrp_structs.h11
-rw-r--r--eigrpd/eigrp_topology.c34
-rw-r--r--eigrpd/eigrp_topology.h10
-rw-r--r--eigrpd/eigrp_update.c127
-rw-r--r--eigrpd/eigrp_vty.c23
-rw-r--r--eigrpd/eigrp_zebra.c5
20 files changed, 186 insertions, 222 deletions
diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h
index 94f6aa70d..3d84c8217 100644
--- a/eigrpd/eigrp_const.h
+++ b/eigrpd/eigrp_const.h
@@ -94,11 +94,7 @@
#define EIGRP_MULTICAST_ADDRESS 0xe000000A /*224.0.0.10*/
#define EIGRP_MAX_METRIC 0xffffffffU /*4294967295*/
-enum metric_change {
- METRIC_DECREASE,
- METRIC_SAME,
- METRIC_INCREASE
-};
+enum metric_change { METRIC_DECREASE, METRIC_SAME, METRIC_INCREASE };
#define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
#define DEFAULT_ROUTE_TYPE(T) ((T) == DEFAULT_ROUTE)
@@ -182,7 +178,7 @@ enum eigrp_fsm_events {
* state not changed
* usually by receiving not last reply
*/
- EIGRP_FSM_KEEP_STATE,
+ EIGRP_FSM_KEEP_STATE,
};
/**
diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c
index 20656ec4e..8857be78e 100644
--- a/eigrpd/eigrp_dump.c
+++ b/eigrpd/eigrp_dump.c
@@ -216,8 +216,7 @@ void show_ip_eigrp_interface_sub(struct vty *vty, struct eigrp *eigrp,
vty_out(vty, "%u %c %-10u", 0, '/',
eigrp_neighbor_packet_queue_sum(ei));
vty_out(vty, "%-7u %-14u %-12u %-8u", 0, 0, 0, 0);
- vty_out(vty, "%-8u %-8u \n", ei->params.v_hello,
- ei->params.v_wait);
+ vty_out(vty, "%-8u %-8u \n", ei->params.v_hello, ei->params.v_wait);
}
void show_ip_eigrp_interface_detail(struct vty *vty, struct eigrp *eigrp,
@@ -253,7 +252,8 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr,
vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr),
eigrp_if_name_string(nbr->ei));
if (nbr->t_holddown)
- vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown));
+ vty_out(vty, "%-7lu",
+ thread_timer_remain_second(nbr->t_holddown));
else
vty_out(vty, "- ");
vty_out(vty, "%-8u %-6u %-5u", 0, 0, EIGRP_PACKET_RETRANS_TIME);
@@ -295,8 +295,7 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
vty_out(vty, "%s, ",
prefix2str(tn->destination, buffer, PREFIX_STRLEN));
- vty_out(vty, "%u successors, ",
- (successors) ? successors->count : 0);
+ vty_out(vty, "%u successors, ", (successors) ? successors->count : 0);
vty_out(vty, "FD is %u, serno: %" PRIu64 " \n", tn->fdistance,
tn->serno);
@@ -305,7 +304,7 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
}
void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
- struct eigrp_nexthop_entry *te, int *first)
+ struct eigrp_nexthop_entry *te, int *first)
{
if (te->reported_distance == EIGRP_MAX_METRIC)
return;
diff --git a/eigrpd/eigrp_dump.h b/eigrpd/eigrp_dump.h
index cda304ba6..389ac1b5f 100644
--- a/eigrpd/eigrp_dump.h
+++ b/eigrpd/eigrp_dump.h
@@ -157,7 +157,7 @@ extern void show_ip_eigrp_neighbor_sub(struct vty *, struct eigrp_neighbor *,
extern void show_ip_eigrp_prefix_entry(struct vty *,
struct eigrp_prefix_entry *);
extern void show_ip_eigrp_nexthop_entry(struct vty *, struct eigrp *,
- struct eigrp_nexthop_entry *, int *);
+ struct eigrp_nexthop_entry *, int *);
extern void eigrp_debug_init(void);
diff --git a/eigrpd/eigrp_fsm.c b/eigrpd/eigrp_fsm.c
index b4978bc06..a4ee5b11d 100644
--- a/eigrpd/eigrp_fsm.c
+++ b/eigrpd/eigrp_fsm.c
@@ -257,8 +257,8 @@ static const char *change2str(enum metric_change change)
* Return number of occurred event (arrow in diagram).
*
*/
-static enum eigrp_fsm_events eigrp_get_fsm_event(
- struct eigrp_fsm_action_message *msg)
+static enum eigrp_fsm_events
+eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
{
// Loading base information from message
// struct eigrp *eigrp = msg->eigrp;
@@ -315,8 +315,7 @@ static enum eigrp_fsm_events eigrp_get_fsm_event(
return EIGRP_FSM_KEEP_STATE;
zlog_info("All reply received\n");
- if (head->reported_distance
- < prefix->fdistance) {
+ if (head->reported_distance < prefix->fdistance) {
return EIGRP_FSM_EVENT_LR_FCS;
}
@@ -417,13 +416,12 @@ int eigrp_fsm_event(struct eigrp_fsm_action_message *msg)
{
enum eigrp_fsm_events event = eigrp_get_fsm_event(msg);
- zlog_info("EIGRP AS: %d State: %s Event: %s Network: %s Packet Type: %s Reply RIJ Count: %d change: %s",
- msg->eigrp->AS, prefix_state2str(msg->prefix->state),
- fsm_state2str(event),
- eigrp_topology_ip_string(msg->prefix),
- packet_type2str(msg->packet_type),
- msg->prefix->rij->count,
- change2str(msg->change));
+ zlog_info(
+ "EIGRP AS: %d State: %s Event: %s Network: %s Packet Type: %s Reply RIJ Count: %d change: %s",
+ msg->eigrp->AS, prefix_state2str(msg->prefix->state),
+ fsm_state2str(event), eigrp_topology_ip_string(msg->prefix),
+ packet_type2str(msg->packet_type), msg->prefix->rij->count,
+ change2str(msg->change));
(*(NSM[msg->prefix->state][event].func))(msg);
return 1;
@@ -444,8 +442,7 @@ int eigrp_fsm_event_nq_fcn(struct eigrp_fsm_action_message *msg)
ne = listnode_head(successors);
prefix->state = EIGRP_FSM_STATE_ACTIVE_1;
- prefix->rdistance = prefix->distance = prefix->fdistance =
- ne->distance;
+ prefix->rdistance = prefix->distance = prefix->fdistance = ne->distance;
prefix->reported_metric = ne->total_metric;
if (eigrp_nbr_count_get()) {
@@ -472,8 +469,7 @@ int eigrp_fsm_event_q_fcn(struct eigrp_fsm_action_message *msg)
ne = listnode_head(successors);
prefix->state = EIGRP_FSM_STATE_ACTIVE_3;
- prefix->rdistance = prefix->distance = prefix->fdistance =
- ne->distance;
+ prefix->rdistance = prefix->distance = prefix->fdistance = ne->distance;
prefix->reported_metric = ne->total_metric;
if (eigrp_nbr_count_get()) {
prefix->req_action |= EIGRP_FSM_NEED_QUERY;
@@ -498,8 +494,7 @@ int eigrp_fsm_event_keep_state(struct eigrp_fsm_action_message *msg)
ne->total_metric)) {
prefix->rdistance = prefix->fdistance =
prefix->distance = ne->distance;
- prefix->reported_metric =
- ne->total_metric;
+ prefix->reported_metric = ne->total_metric;
if (msg->packet_type == EIGRP_OPC_QUERY)
eigrp_send_reply(msg->adv_router, prefix);
prefix->req_action |= EIGRP_FSM_NEED_UPDATE;
@@ -523,8 +518,7 @@ int eigrp_fsm_event_lr(struct eigrp_fsm_action_message *msg)
struct eigrp_prefix_entry *prefix = msg->prefix;
struct eigrp_nexthop_entry *ne = listnode_head(prefix->entries);
- prefix->fdistance = prefix->distance = prefix->rdistance =
- ne->distance;
+ prefix->fdistance = prefix->distance = prefix->rdistance = ne->distance;
prefix->reported_metric = ne->total_metric;
if (prefix->state == EIGRP_FSM_STATE_ACTIVE_3) {
@@ -533,8 +527,7 @@ int eigrp_fsm_event_lr(struct eigrp_fsm_action_message *msg)
assert(successors); // It's like Napolean and Waterloo
ne = listnode_head(successors);
- eigrp_send_reply(ne->adv_router,
- prefix);
+ eigrp_send_reply(ne->adv_router, prefix);
list_delete_and_null(&successors);
}
@@ -587,8 +580,7 @@ int eigrp_fsm_event_lr_fcs(struct eigrp_fsm_action_message *msg)
assert(successors); // Having a spoon and all you need is a
// knife
ne = listnode_head(successors);
- eigrp_send_reply(ne->adv_router,
- prefix);
+ eigrp_send_reply(ne->adv_router, prefix);
list_delete_and_null(&successors);
}
diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c
index 1cb265cf1..bba028f1e 100644
--- a/eigrpd/eigrp_hello.c
+++ b/eigrpd/eigrp_hello.c
@@ -96,8 +96,8 @@ int eigrp_hello_timer(struct thread *thread)
/* Hello timer set. */
ei->t_hello = NULL;
- thread_add_timer(master, eigrp_hello_timer, ei,
- ei->params.v_hello, &ei->t_hello);
+ thread_add_timer(master, eigrp_hello_timer, ei, ei->params.v_hello,
+ &ei->t_hello);
return 0;
}
@@ -443,7 +443,7 @@ static u_int16_t eigrp_sw_version_encode(struct stream *s)
stream_putw(s, EIGRP_TLV_SW_VERSION);
stream_putw(s, length);
- stream_putc(s, FRR_MAJOR); //!< major os version
+ stream_putc(s, FRR_MAJOR); //!< major os version
stream_putc(s, FRR_MINOR); //!< minor os version
/* and the core eigrp version */
@@ -634,14 +634,14 @@ static struct eigrp_packet *eigrp_hello_encode(struct eigrp_interface *ei,
if (ep) {
// encode common header feilds
- eigrp_packet_header_init(EIGRP_OPC_HELLO, ei->eigrp, ep->s, 0, 0, ack);
+ eigrp_packet_header_init(EIGRP_OPC_HELLO, ei->eigrp, ep->s, 0,
+ 0, ack);
// encode Authentication TLV
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& (ei->params.auth_keychain != NULL)) {
length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei);
- } else if ((ei->params.auth_type
- == EIGRP_AUTH_TYPE_SHA256)
+ } else if ((ei->params.auth_type == EIGRP_AUTH_TYPE_SHA256)
&& (ei->params.auth_keychain != NULL)) {
length += eigrp_add_authTLV_SHA256_to_stream(ep->s, ei);
}
@@ -680,8 +680,7 @@ static struct eigrp_packet *eigrp_hello_encode(struct eigrp_interface *ei,
&& (ei->params.auth_keychain != NULL)) {
eigrp_make_md5_digest(ei, ep->s,
EIGRP_AUTH_BASIC_HELLO_FLAG);
- } else if ((ei->params.auth_type
- == EIGRP_AUTH_TYPE_SHA256)
+ } else if ((ei->params.auth_type == EIGRP_AUTH_TYPE_SHA256)
&& (ei->params.auth_keychain != NULL)) {
eigrp_make_sha256_digest(ei, ep->s,
EIGRP_AUTH_BASIC_HELLO_FLAG);
diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c
index ec29d86fd..2897e262c 100644
--- a/eigrpd/eigrp_interface.c
+++ b/eigrpd/eigrp_interface.c
@@ -125,12 +125,11 @@ struct list *eigrp_iflist;
void eigrp_if_init()
{
/* Initialize Zebra interface data structure. */
- //hook_register_prio(if_add, 0, eigrp_if_new);
+ // hook_register_prio(if_add, 0, eigrp_if_new);
hook_register_prio(if_del, 0, eigrp_if_delete_hook);
}
-
void eigrp_del_if_params(struct eigrp_if_params *eip)
{
if (eip->auth_keychain)
@@ -160,8 +159,7 @@ int eigrp_if_up(struct eigrp_interface *ei)
thread_add_event(master, eigrp_hello_timer, ei, (1), NULL);
/*Prepare metrics*/
- metric.bandwidth =
- eigrp_bandwidth_to_scaled(ei->params.bandwidth);
+ metric.bandwidth = eigrp_bandwidth_to_scaled(ei->params.bandwidth);
metric.delay = eigrp_delay_to_scaled(ei->params.delay);
metric.load = ei->params.load;
metric.reliability = ei->params.reliability;
@@ -310,8 +308,7 @@ void eigrp_if_set_multicast(struct eigrp_interface *ei)
* group. */
if (ei->member_allrouters) {
/* Only actually drop if this is the last reference */
- eigrp_if_drop_allspfrouters(ei->eigrp,
- ei->address,
+ eigrp_if_drop_allspfrouters(ei->eigrp, ei->address,
ei->ifp->ifindex);
/* Unset the flag regardless of whether the system call
to leave
@@ -333,8 +330,7 @@ u_char eigrp_default_iftype(struct interface *ifp)
return EIGRP_IFTYPE_BROADCAST;
}
-void eigrp_if_free(struct eigrp_interface *ei,
- int source)
+void eigrp_if_free(struct eigrp_interface *ei, int source)
{
struct prefix dest_addr;
struct eigrp_prefix_entry *pe;
diff --git a/eigrpd/eigrp_macros.h b/eigrpd/eigrp_macros.h
index 14a8892ba..eea7a2642 100644
--- a/eigrpd/eigrp_macros.h
+++ b/eigrpd/eigrp_macros.h
@@ -28,7 +28,6 @@
#ifndef _ZEBRA_EIGRP_MACROS_H_
#define _ZEBRA_EIGRP_MACROS_H_
-
//--------------------------------------------------------------------------
#define EIGRP_IF_STRING_MAXLEN 40
diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c
index b7b336949..77bd93f6b 100644
--- a/eigrpd/eigrp_neighbor.c
+++ b/eigrpd/eigrp_neighbor.c
@@ -358,7 +358,8 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
eigrp_nbr_delete(nbr);
}
-int eigrp_nbr_split_horizon_check(struct eigrp_nexthop_entry *ne, struct eigrp_interface *ei)
+int eigrp_nbr_split_horizon_check(struct eigrp_nexthop_entry *ne,
+ struct eigrp_interface *ei)
{
if (ne->distance == EIGRP_MAX_METRIC)
return 0;
diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c
index 21413bf44..a70a7fc76 100644
--- a/eigrpd/eigrp_network.c
+++ b/eigrpd/eigrp_network.c
@@ -280,8 +280,7 @@ static void eigrp_network_run_interface(struct eigrp *eigrp, struct prefix *p,
if (CHECK_FLAG(co->flags, ZEBRA_IFA_SECONDARY))
continue;
- if (p->family == co->address->family
- && !ifp->info
+ if (p->family == co->address->family && !ifp->info
&& eigrp_network_match_iface(co, p)) {
ei = eigrp_if_new(eigrp, ifp, co->address);
@@ -408,17 +407,17 @@ u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
struct eigrp_interface *ei = entry->ei;
entry->total_metric = entry->reported_metric;
- uint64_t temp_delay = (uint64_t)entry->total_metric.delay
- + (uint64_t)eigrp_delay_to_scaled(ei->params.delay);
+ uint64_t temp_delay =
+ (uint64_t)entry->total_metric.delay
+ + (uint64_t)eigrp_delay_to_scaled(ei->params.delay);
entry->total_metric.delay = temp_delay > EIGRP_MAX_METRIC
? EIGRP_MAX_METRIC
: (u_int32_t)temp_delay;
- u_int32_t bw =
- eigrp_bandwidth_to_scaled(ei->params.bandwidth);
+ u_int32_t bw = eigrp_bandwidth_to_scaled(ei->params.bandwidth);
entry->total_metric.bandwidth = entry->total_metric.bandwidth > bw
- ? bw
- : entry->total_metric.bandwidth;
+ ? bw
+ : entry->total_metric.bandwidth;
return eigrp_calculate_metrics(eigrp, entry->total_metric);
}
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c
index ea6f1f3f6..e2cd44429 100644
--- a/eigrpd/eigrp_packet.c
+++ b/eigrpd/eigrp_packet.c
@@ -194,8 +194,9 @@ int eigrp_check_md5_digest(struct stream *s,
key = key_lookup_for_send(keychain);
if (!key) {
- zlog_warn("Interface %s: Expected key value not found in config",
- nbr->ei->ifp->name);
+ zlog_warn(
+ "Interface %s: Expected key value not found in config",
+ nbr->ei->ifp->name);
return 0;
}
@@ -270,8 +271,9 @@ int eigrp_make_sha256_digest(struct eigrp_interface *ei, struct stream *s,
key = key_lookup_for_send(keychain);
if (!key) {
- zlog_warn("Interface %s: Expected key value not found in config",
- ei->ifp->name);
+ zlog_warn(
+ "Interface %s: Expected key value not found in config",
+ ei->ifp->name);
eigrp_authTLV_SHA256_free(auth_TLV);
return 0;
}
@@ -325,8 +327,6 @@ int eigrp_write(struct thread *thread)
#ifdef WANT_EIGRP_WRITE_FRAGMENT
static u_int16_t ipid = 0;
#endif /* WANT_EIGRP_WRITE_FRAGMENT */
- /* $FRR indent$ */
-/* clang-format off */
#define EIGRP_WRITE_IPHL_SHIFT 2
eigrp->t_write = NULL;
@@ -350,8 +350,7 @@ int eigrp_write(struct thread *thread)
goto out;
}
if (ep->length < EIGRP_HEADER_LEN) {
- zlog_err("%s: Packet just has a header?",
- __PRETTY_FUNCTION__);
+ zlog_err("%s: Packet just has a header?", __PRETTY_FUNCTION__);
eigrp_header_dump((struct eigrp_header *)ep->s->data);
eigrp_packet_delete(ei);
goto out;
@@ -435,10 +434,10 @@ int eigrp_write(struct thread *thread)
if (IS_DEBUG_EIGRP_TRANSMIT(0, SEND)) {
eigrph = (struct eigrp_header *)STREAM_DATA(ep->s);
- zlog_debug("Sending [%s][%d/%d] to [%s] via [%s] ret [%d].",
- lookup_msg(eigrp_packet_type_str, eigrph->opcode, NULL),
- seqno, ack,
- inet_ntoa(ep->dst), IF_NAME(ei), ret);
+ zlog_debug(
+ "Sending [%s][%d/%d] to [%s] via [%s] ret [%d].",
+ lookup_msg(eigrp_packet_type_str, eigrph->opcode, NULL),
+ seqno, ack, inet_ntoa(ep->dst), IF_NAME(ei), ret);
}
if (ret < 0)
@@ -615,10 +614,11 @@ int eigrp_read(struct thread *thread)
strlcpy(src, inet_ntoa(iph->ip_src), sizeof(src));
strlcpy(dst, inet_ntoa(iph->ip_dst), sizeof(dst));
- zlog_debug("Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]",
- lookup_msg(eigrp_packet_type_str, opcode, NULL),
- ntohl(eigrph->sequence), ntohl(eigrph->ack), length,
- IF_NAME(ei), src, dst);
+ zlog_debug(
+ "Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]",
+ lookup_msg(eigrp_packet_type_str, opcode, NULL),
+ ntohl(eigrph->sequence), ntohl(eigrph->ack), length,
+ IF_NAME(ei), src, dst);
}
/* Read rest of the packet and call each sort of packet routine. */
@@ -639,7 +639,8 @@ int eigrp_read(struct thread *thread)
eigrp_packet_free(ep);
if ((nbr->state == EIGRP_NEIGHBOR_PENDING)
- && (ntohl(eigrph->ack) == nbr->init_sequence_number)) {
+ && (ntohl(eigrph->ack)
+ == nbr->init_sequence_number)) {
eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_UP);
zlog_info("Neighbor(%s) adjacency became full",
inet_ntoa(nbr->src));
@@ -647,8 +648,7 @@ int eigrp_read(struct thread *thread)
nbr->recv_sequence_number =
ntohl(eigrph->sequence);
eigrp_update_send_EOT(nbr);
- }
- else
+ } else
eigrp_send_packet_reliably(nbr);
}
ep = eigrp_fifo_next(nbr->multicast_queue);
@@ -875,9 +875,9 @@ void eigrp_packet_checksum(struct eigrp_interface *ei, struct stream *s,
}
/* Make EIGRP header. */
-void eigrp_packet_header_init(int type, struct eigrp *eigrp,
- struct stream *s, u_int32_t flags,
- u_int32_t sequence, u_int32_t ack)
+void eigrp_packet_header_init(int type, struct eigrp *eigrp, struct stream *s,
+ u_int32_t flags, u_int32_t sequence,
+ u_int32_t ack)
{
struct eigrp_header *eigrph;
@@ -1234,8 +1234,7 @@ u_int16_t eigrp_add_internalTLV_to_stream(struct stream *s,
stream_putc(s, pe->destination->u.prefix4.s_addr & 0xFF);
if (pe->destination->prefixlen > 8)
- stream_putc(s,
- (pe->destination->u.prefix4.s_addr >> 8) & 0xFF);
+ stream_putc(s, (pe->destination->u.prefix4.s_addr >> 8) & 0xFF);
if (pe->destination->prefixlen > 16)
stream_putc(s,
(pe->destination->u.prefix4.s_addr >> 16) & 0xFF);
diff --git a/eigrpd/eigrp_packet.h b/eigrpd/eigrp_packet.h
index a7d510218..00e1c7eac 100644
--- a/eigrpd/eigrp_packet.h
+++ b/eigrpd/eigrp_packet.h
@@ -41,9 +41,8 @@ extern struct eigrp_packet *eigrp_packet_duplicate(struct eigrp_packet *,
struct eigrp_neighbor *);
extern void eigrp_packet_free(struct eigrp_packet *);
extern void eigrp_packet_delete(struct eigrp_interface *);
-extern void eigrp_packet_header_init(int, struct eigrp *,
- struct stream *, u_int32_t, u_int32_t,
- u_int32_t);
+extern void eigrp_packet_header_init(int, struct eigrp *, struct stream *,
+ u_int32_t, u_int32_t, u_int32_t);
extern void eigrp_packet_checksum(struct eigrp_interface *, struct stream *,
u_int16_t);
@@ -84,8 +83,7 @@ extern int eigrp_hello_timer(struct thread *);
* These externs are found in eigrp_update.c
*/
extern bool eigrp_update_prefix_apply(struct eigrp *eigrp,
- struct eigrp_interface *ei,
- int in,
+ struct eigrp_interface *ei, int in,
struct prefix *prefix);
extern void eigrp_update_send(struct eigrp_interface *);
extern void eigrp_update_receive(struct eigrp *, struct ip *,
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c
index 1fe70b60e..72780f7a0 100644
--- a/eigrpd/eigrp_query.c
+++ b/eigrpd/eigrp_query.c
@@ -142,13 +142,13 @@ void eigrp_query_receive(struct eigrp *eigrp, struct ip *iph,
break;
case EIGRP_TLV_IPv4_EXT:
- /* DVS: processing of external routes needs packet and fsm work.
- * for now, lets just not creash the box
- */
+ /* DVS: processing of external routes needs packet and fsm work.
+ * for now, lets just not creash the box
+ */
default:
length = stream_getw(s);
// -2 for type, -2 for len
- for (length-=4; length ; length--) {
+ for (length -= 4; length; length--) {
(void)stream_getc(s);
}
}
@@ -177,16 +177,15 @@ void eigrp_send_query(struct eigrp_interface *ei)
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_QUERY,
- ei->eigrp, ep->s, 0,
+ eigrp_packet_header_init(EIGRP_OPC_QUERY, ei->eigrp,
+ ep->s, 0,
ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& (ei->params.auth_keychain != NULL)) {
- length +=
- eigrp_add_authTLV_MD5_to_stream(ep->s,
- ei);
+ length += eigrp_add_authTLV_MD5_to_stream(ep->s,
+ ei);
}
new_packet = false;
}
diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c
index 84396f087..ae2d0c090 100644
--- a/eigrpd/eigrp_reply.c
+++ b/eigrpd/eigrp_reply.c
@@ -75,12 +75,10 @@ void eigrp_send_reply(struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe)
sizeof(struct eigrp_prefix_entry));
memcpy(pe2, pe, sizeof(struct eigrp_prefix_entry));
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_OUT,
+ if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,
pe2->destination)) {
zlog_info("REPLY SEND: Setting Metric to max");
pe2->reported_metric.delay = EIGRP_MAX_METRIC;
-
}
/*
@@ -163,17 +161,18 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
dest_addr.u.prefix4 = tlv->destination;
dest_addr.prefixlen = tlv->prefix_length;
struct eigrp_prefix_entry *dest =
- eigrp_topology_table_lookup_ipv4(
- eigrp->topology_table, &dest_addr);
+ eigrp_topology_table_lookup_ipv4(eigrp->topology_table,
+ &dest_addr);
/*
* Destination must exists
*/
if (!dest) {
char buf[PREFIX_STRLEN];
- zlog_err("%s: Received prefix %s which we do not know about",
- __PRETTY_FUNCTION__,
- prefix2str(&dest_addr, buf, sizeof(buf)));
+ zlog_err(
+ "%s: Received prefix %s which we do not know about",
+ __PRETTY_FUNCTION__,
+ prefix2str(&dest_addr, buf, sizeof(buf)));
eigrp_IPv4_InternalTLV_free(tlv);
continue;
}
@@ -182,8 +181,7 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
struct eigrp_nexthop_entry *entry =
eigrp_prefix_entry_lookup(dest->entries, nbr);
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_IN,
+ if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_IN,
&dest_addr)) {
tlv->metric.delay = EIGRP_MAX_METRIC;
}
diff --git a/eigrpd/eigrp_routemap.h b/eigrpd/eigrp_routemap.h
index 1d37b25ef..c47167961 100644
--- a/eigrpd/eigrp_routemap.h
+++ b/eigrpd/eigrp_routemap.h
@@ -11,8 +11,7 @@
#include "if_rmap.h"
extern bool eigrp_routemap_prefix_apply(struct eigrp *eigrp,
- struct eigrp_interface *ei,
- int in,
+ struct eigrp_interface *ei, int in,
struct prefix *prefix);
extern void eigrp_route_map_update(const char *);
extern void eigrp_route_map_init();
diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h
index aae56c8ff..ea281fc97 100644
--- a/eigrpd/eigrp_structs.h
+++ b/eigrpd/eigrp_structs.h
@@ -104,9 +104,8 @@ struct eigrp {
uint64_t serno; /* Global serial number counter for topology entry
changes*/
- uint64_t
- serno_last_update; /* Highest serial number of information send
- by last update*/
+ uint64_t serno_last_update; /* Highest serial number of information send
+ by last update*/
struct list *topology_changes_internalIPV4;
struct list *topology_changes_externalIPV4;
@@ -140,14 +139,14 @@ struct eigrp_if_params {
u_char passive_interface;
u_int32_t v_hello;
u_int16_t v_wait;
- u_char type; /* type of interface */
+ u_char type; /* type of interface */
u_int32_t bandwidth;
u_int32_t delay;
u_char reliability;
u_char load;
char *auth_keychain; /* Associated keychain with interface*/
- int auth_type; /* EIGRP authentication type */
+ int auth_type; /* EIGRP authentication type */
};
enum { MEMBER_ALLROUTERS = 0,
@@ -160,7 +159,7 @@ struct eigrp_interface {
/*multicast group refcnts */
bool member_allrouters;
-
+
/* This interface's parent eigrp instance. */
struct eigrp *eigrp;
diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c
index 7d352b8be..bab47ea13 100644
--- a/eigrpd/eigrp_topology.c
+++ b/eigrpd/eigrp_topology.c
@@ -52,7 +52,7 @@
#include "eigrpd/eigrp_memory.h"
static int eigrp_nexthop_entry_cmp(struct eigrp_nexthop_entry *,
- struct eigrp_nexthop_entry *);
+ struct eigrp_nexthop_entry *);
/*
* Returns linkedlist used as topology table
@@ -87,7 +87,7 @@ struct eigrp_prefix_entry *eigrp_prefix_entry_new()
* Topology entry comparison
*/
static int eigrp_nexthop_entry_cmp(struct eigrp_nexthop_entry *entry1,
- struct eigrp_nexthop_entry *entry2)
+ struct eigrp_nexthop_entry *entry2)
{
if (entry1->distance < entry2->distance)
return -1;
@@ -142,10 +142,10 @@ void eigrp_prefix_entry_add(struct route_table *topology,
if (IS_DEBUG_EIGRP_EVENT) {
char buf[PREFIX_STRLEN];
- zlog_debug("%s: %s Should we have found this entry in the topo table?",
- __PRETTY_FUNCTION__,
- prefix2str(pe->destination, buf,
- sizeof(buf)));
+ zlog_debug(
+ "%s: %s Should we have found this entry in the topo table?",
+ __PRETTY_FUNCTION__,
+ prefix2str(pe->destination, buf, sizeof(buf)));
}
}
@@ -157,7 +157,7 @@ void eigrp_prefix_entry_add(struct route_table *topology,
* Adding topology entry to topology node
*/
void eigrp_nexthop_entry_add(struct eigrp_prefix_entry *node,
- struct eigrp_nexthop_entry *entry)
+ struct eigrp_nexthop_entry *entry)
{
struct list *l = list_new();
@@ -197,8 +197,8 @@ void eigrp_prefix_entry_delete(struct route_table *table,
eigrp_zebra_route_delete(pe->destination);
rn->info = NULL;
- route_unlock_node(rn); //Lookup above
- route_unlock_node(rn); //Initial creation
+ route_unlock_node(rn); // Lookup above
+ route_unlock_node(rn); // Initial creation
XFREE(MTYPE_EIGRP_PREFIX_ENTRY, pe);
}
@@ -206,7 +206,7 @@ void eigrp_prefix_entry_delete(struct route_table *table,
* Deleting topology entry from topology node
*/
void eigrp_nexthop_entry_delete(struct eigrp_prefix_entry *node,
- struct eigrp_nexthop_entry *entry)
+ struct eigrp_nexthop_entry *entry)
{
if (listnode_lookup(node->entries, entry) != NULL) {
listnode_delete(node->entries, entry);
@@ -355,7 +355,8 @@ struct list *eigrp_neighbor_prefixes_lookup(struct eigrp *eigrp,
return prefixes;
}
-enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_message *msg)
+enum metric_change
+eigrp_topology_update_distance(struct eigrp_fsm_action_message *msg)
{
struct eigrp *eigrp = msg->eigrp;
struct eigrp_prefix_entry *prefix = msg->prefix;
@@ -365,7 +366,7 @@ enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_messag
assert(entry);
- switch(msg->data_type) {
+ switch (msg->data_type) {
case EIGRP_CONNECTED:
if (prefix->nt == EIGRP_TOPOLOGY_TYPE_CONNECTED)
return change;
@@ -382,8 +383,8 @@ enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_messag
return change; // No change
}
- new_reported_distance = eigrp_calculate_metrics(eigrp,
- msg->metrics);
+ new_reported_distance =
+ eigrp_calculate_metrics(eigrp, msg->metrics);
if (entry->reported_distance < new_reported_distance) {
change = METRIC_INCREASE;
@@ -410,7 +411,7 @@ enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_messag
zlog_err("%s: Please implement handler", __PRETTY_FUNCTION__);
break;
}
- distance_done:
+distance_done:
/*
* Move to correct position in list according to new distance
*/
@@ -469,8 +470,7 @@ void eigrp_update_routing_table(struct eigrp_prefix_entry *prefix)
struct eigrp_nexthop_entry *entry;
if (successors) {
- eigrp_zebra_route_add(prefix->destination,
- successors);
+ eigrp_zebra_route_add(prefix->destination, successors);
for (ALL_LIST_ELEMENTS_RO(successors, node, entry))
entry->flags |= EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG;
diff --git a/eigrpd/eigrp_topology.h b/eigrpd/eigrp_topology.h
index c8772c8c3..af39f7f1a 100644
--- a/eigrpd/eigrp_topology.h
+++ b/eigrpd/eigrp_topology.h
@@ -42,16 +42,15 @@ extern void eigrp_topology_cleanup(struct route_table *table);
extern void eigrp_prefix_entry_add(struct route_table *table,
struct eigrp_prefix_entry *pe);
extern void eigrp_nexthop_entry_add(struct eigrp_prefix_entry *,
- struct eigrp_nexthop_entry *);
+ struct eigrp_nexthop_entry *);
extern void eigrp_prefix_entry_delete(struct route_table *table,
struct eigrp_prefix_entry *pe);
extern void eigrp_nexthop_entry_delete(struct eigrp_prefix_entry *,
- struct eigrp_nexthop_entry *);
+ struct eigrp_nexthop_entry *);
extern void eigrp_topology_delete_all(struct route_table *table);
extern unsigned int eigrp_topology_table_isempty(struct list *);
extern struct eigrp_prefix_entry *
-eigrp_topology_table_lookup_ipv4(struct route_table *table,
- struct prefix *p);
+eigrp_topology_table_lookup_ipv4(struct route_table *table, struct prefix *p);
extern struct list *eigrp_topology_get_successor(struct eigrp_prefix_entry *);
extern struct list *
eigrp_topology_get_successor_max(struct eigrp_prefix_entry *pe,
@@ -62,7 +61,8 @@ extern struct list *eigrp_neighbor_prefixes_lookup(struct eigrp *,
struct eigrp_neighbor *);
extern void eigrp_topology_update_all_node_flags(struct eigrp *);
extern void eigrp_topology_update_node_flags(struct eigrp_prefix_entry *);
-extern enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_message *);
+extern enum metric_change
+eigrp_topology_update_distance(struct eigrp_fsm_action_message *);
extern void eigrp_update_routing_table(struct eigrp_prefix_entry *);
extern void eigrp_topology_neighbor_down(struct eigrp *,
struct eigrp_neighbor *);
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index c3eb62886..baaf7f689 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -63,8 +63,7 @@
#include "eigrpd/eigrp_network.h"
#include "eigrpd/eigrp_memory.h"
-bool eigrp_update_prefix_apply(struct eigrp *eigrp,
- struct eigrp_interface *ei,
+bool eigrp_update_prefix_apply(struct eigrp *eigrp, struct eigrp_interface *ei,
int in, struct prefix *prefix)
{
struct access_list *alist;
@@ -143,9 +142,9 @@ 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)) {
char buffer[PREFIX_STRLEN];
- zlog_debug("GR receive: Neighbor not advertised %s",
- prefix2str(prefix->destination,
- buffer, PREFIX_STRLEN));
+ zlog_debug(
+ "GR receive: Neighbor not advertised %s",
+ prefix2str(prefix->destination, buffer, PREFIX_STRLEN));
fsm_msg.metrics = prefix->reported_metric;
/* set delay to MAX */
@@ -335,9 +334,9 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
/*Here comes topology information save*/
pe = eigrp_prefix_entry_new();
pe->serno = eigrp->serno;
- pe->destination = (struct prefix *)prefix_ipv4_new();
- prefix_copy(pe->destination,
- &dest_addr);
+ pe->destination =
+ (struct prefix *)prefix_ipv4_new();
+ prefix_copy(pe->destination, &dest_addr);
pe->af = AF_INET;
pe->state = EIGRP_FSM_STATE_PASSIVE;
pe->nt = EIGRP_TOPOLOGY_TYPE_REMOTE;
@@ -354,7 +353,8 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
if (eigrp_update_prefix_apply(eigrp, ei,
EIGRP_FILTER_IN,
&dest_addr))
- ne->reported_metric.delay = EIGRP_MAX_METRIC;
+ ne->reported_metric.delay =
+ EIGRP_MAX_METRIC;
ne->distance = eigrp_calculate_total_metrics(
eigrp, ne);
@@ -381,13 +381,13 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
break;
case EIGRP_TLV_IPv4_EXT:
- /* DVS: processing of external routes needs packet and fsm work.
- * for now, lets just not creash the box
- */
+ /* DVS: processing of external routes needs packet and fsm work.
+ * for now, lets just not creash the box
+ */
default:
length = stream_getw(s);
// -2 for type, -2 for len
- for (length-=4; length ; length--) {
+ for (length -= 4; length; length--) {
(void)stream_getc(s);
}
}
@@ -428,10 +428,9 @@ void eigrp_update_send_init(struct eigrp_neighbor *nbr)
nbr->ei->eigrp->sequence_number,
nbr->recv_sequence_number);
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei->eigrp,
- ep->s, EIGRP_INIT_FLAG,
- nbr->ei->eigrp->sequence_number,
- nbr->recv_sequence_number);
+ eigrp_packet_header_init(
+ EIGRP_OPC_UPDATE, nbr->ei->eigrp, ep->s, EIGRP_INIT_FLAG,
+ nbr->ei->eigrp->sequence_number, nbr->recv_sequence_number);
// encode Authentication TLV, if needed
if ((nbr->ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
@@ -464,12 +463,11 @@ void eigrp_update_send_init(struct eigrp_neighbor *nbr)
static void eigrp_update_place_on_nbr_queue(struct eigrp_neighbor *nbr,
struct eigrp_packet *ep,
- u_int32_t seq_no,
- int length)
+ u_int32_t seq_no, int length)
{
- if((nbr->ei->params.auth_type == EIGRP_AUTH_TYPE_MD5) &&
- (nbr->ei->params.auth_keychain != NULL)) {
- eigrp_make_md5_digest(nbr->ei,ep->s, EIGRP_AUTH_UPDATE_FLAG);
+ if ((nbr->ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
+ && (nbr->ei->params.auth_keychain != NULL)) {
+ eigrp_make_md5_digest(nbr->ei, ep->s, EIGRP_AUTH_UPDATE_FLAG);
}
/* EIGRP Checksum */
@@ -541,14 +539,13 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
ep = eigrp_packet_new(mtu, nbr);
/* Prepare EIGRP EOT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp,
- ep->s, EIGRP_EOT_FLAG,
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp, ep->s, EIGRP_EOT_FLAG,
seq_no, nbr->recv_sequence_number);
// encode Authentication TLV, if needed
- if((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5) &&
- (ei->params.auth_keychain != NULL)) {
- length += eigrp_add_authTLV_MD5_to_stream(ep->s,ei);
+ if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
+ && (ei->params.auth_keychain != NULL)) {
+ length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei);
}
for (rn = route_top(eigrp->topology_table); rn; rn = route_next(rn)) {
@@ -561,38 +558,40 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
continue;
if ((length + EIGRP_TLV_MAX_IPV4_BYTE) > mtu) {
- eigrp_update_place_on_nbr_queue (nbr, ep, seq_no, length);
+ eigrp_update_place_on_nbr_queue(nbr, ep, seq_no,
+ length);
seq_no++;
length = EIGRP_HEADER_LEN;
ep = eigrp_packet_new(mtu, nbr);
- eigrp_packet_header_init(EIGRP_OPC_UPDATE,
- nbr->ei->eigrp,
- ep->s, EIGRP_EOT_FLAG,
- seq_no,
- nbr->recv_sequence_number);
-
- if((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5) &&
- (ei->params.auth_keychain != NULL))
- {
- length += eigrp_add_authTLV_MD5_to_stream(ep->s,ei);
+ eigrp_packet_header_init(
+ EIGRP_OPC_UPDATE, nbr->ei->eigrp, ep->s,
+ EIGRP_EOT_FLAG, seq_no,
+ nbr->recv_sequence_number);
+
+ if ((ei->params.auth_type
+ == EIGRP_AUTH_TYPE_MD5)
+ && (ei->params.auth_keychain != NULL)) {
+ length +=
+ eigrp_add_authTLV_MD5_to_stream(
+ ep->s, ei);
}
}
/* Get destination address from prefix */
dest_addr = pe->destination;
/* Check if any list fits */
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_OUT,
- dest_addr))
+ if (eigrp_update_prefix_apply(
+ eigrp, ei, EIGRP_FILTER_OUT, dest_addr))
continue;
else {
- length += eigrp_add_internalTLV_to_stream(ep->s, pe);
+ length += eigrp_add_internalTLV_to_stream(ep->s,
+ pe);
}
}
}
- eigrp_update_place_on_nbr_queue (nbr, ep, seq_no, length);
+ eigrp_update_place_on_nbr_queue(nbr, ep, seq_no, length);
eigrp->sequence_number = seq_no++;
}
@@ -614,8 +613,7 @@ void eigrp_update_send(struct eigrp_interface *ei)
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp,
- ep->s, 0, seq_no, 0);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp, ep->s, 0, seq_no, 0);
// encode Authentication TLV, if needed
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
@@ -635,11 +633,12 @@ void eigrp_update_send(struct eigrp_interface *ei)
if (eigrp_nbr_split_horizon_check(ne, ei))
continue;
- if ((length + EIGRP_TLV_MAX_IPV4_BYTE) >
- (u_int16_t)ei->ifp->mtu) {
+ if ((length + EIGRP_TLV_MAX_IPV4_BYTE)
+ > (u_int16_t)ei->ifp->mtu) {
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& (ei->params.auth_keychain != NULL)) {
- eigrp_make_md5_digest(ei, ep->s, EIGRP_AUTH_UPDATE_FLAG);
+ eigrp_make_md5_digest(ei, ep->s,
+ EIGRP_AUTH_UPDATE_FLAG);
}
eigrp_packet_checksum(ei, ep->s, length);
@@ -653,25 +652,24 @@ void eigrp_update_send(struct eigrp_interface *ei)
length = EIGRP_HEADER_LEN;
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp,
- ep->s, 0, seq_no, 0);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp, ep->s,
+ 0, seq_no, 0);
if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
&& (ei->params.auth_keychain != NULL)) {
- length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei);
+ length += eigrp_add_authTLV_MD5_to_stream(ep->s,
+ ei);
}
has_tlv = 0;
}
/* Get destination address from prefix */
dest_addr = pe->destination;
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_OUT,
+ if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,
dest_addr)) {
// pe->reported_metric.delay = EIGRP_MAX_METRIC;
continue;
} else {
- length += eigrp_add_internalTLV_to_stream(ep->s,
- pe);
+ length += eigrp_add_internalTLV_to_stream(ep->s, pe);
has_tlv = 1;
}
}
@@ -729,7 +727,8 @@ void eigrp_update_send_all(struct eigrp *eigrp,
/**
* @fn eigrp_update_send_GR_part
*
- * @param[in] nbr contains neighbor who would receive Graceful
+ * @param[in] nbr contains neighbor who would receive
+ * Graceful
* restart
*
* @return void
@@ -814,8 +813,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
*/
dest_addr = pe->destination;
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_OUT,
+ if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,
dest_addr)) {
/* do not send filtered route */
zlog_info("Filtered prefix %s won't be sent out.",
@@ -830,8 +828,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
* This makes no sense, Filter out then filter in???
* Look into this more - DBS
*/
- if (eigrp_update_prefix_apply(eigrp, ei,
- EIGRP_FILTER_IN,
+ if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_IN,
dest_addr)) {
/* do not send filtered route */
zlog_info("Filtered prefix %s will be removed.",
@@ -942,7 +939,8 @@ int eigrp_update_send_GR_thread(struct thread *thread)
/**
* @fn eigrp_update_send_GR
*
- * @param[in] nbr Neighbor who would receive Graceful
+ * @param[in] nbr Neighbor who would receive
+ * Graceful
* restart
* @param[in] gr_type Who executed Graceful restart
* @param[in] vty Virtual terminal for log output
@@ -980,8 +978,7 @@ void eigrp_update_send_GR(struct eigrp_neighbor *nbr, enum GR_type gr_type,
vty_out(vty,
"Neighbor %s (%s) is resync: manually cleared\n",
inet_ntoa(nbr->src),
- ifindex2ifname(ei->ifp->ifindex,
- VRF_DEFAULT));
+ ifindex2ifname(ei->ifp->ifindex, VRF_DEFAULT));
}
}
@@ -1007,7 +1004,9 @@ void eigrp_update_send_GR(struct eigrp_neighbor *nbr, enum GR_type gr_type,
/**
* @fn eigrp_update_send_interface_GR
*
- * @param[in] ei Interface to neighbors of which the GR
+ * @param[in] ei Interface to neighbors of which
+ * the
+ * GR
* is sent
* @param[in] gr_type Who executed Graceful restart
* @param[in] vty Virtual terminal for log output
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 4e7642853..96c96411f 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -109,8 +109,7 @@ static int config_write_interfaces(struct vty *vty, struct eigrp *eigrp)
if (ei->params.auth_keychain) {
vty_out(vty,
" ip authentication key-chain eigrp %d %s\n",
- eigrp->AS,
- ei->params.auth_keychain);
+ eigrp->AS, ei->params.auth_keychain);
}
if (ei->params.v_hello != EIGRP_HELLO_INTERVAL_DEFAULT) {
@@ -147,8 +146,7 @@ static int eigrp_write_interface(struct vty *vty)
vty_out(vty, " description %s\n", ifp->desc);
if (ei->params.bandwidth != EIGRP_BANDWIDTH_DEFAULT)
- vty_out(vty, " bandwidth %u\n",
- ei->params.bandwidth);
+ vty_out(vty, " bandwidth %u\n", ei->params.bandwidth);
if (ei->params.delay != EIGRP_DELAY_DEFAULT)
vty_out(vty, " delay %u\n", ei->params.delay);
if (ei->params.v_hello != EIGRP_HELLO_INTERVAL_DEFAULT)
@@ -495,7 +493,7 @@ DEFUN (show_ip_eigrp_topology,
& EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG)
== EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG))) {
show_ip_eigrp_nexthop_entry(vty, eigrp, te,
- &first);
+ &first);
first = 0;
}
}
@@ -777,8 +775,7 @@ DEFUN (no_eigrp_if_ip_hellointerval,
ei->params.v_hello = EIGRP_HELLO_INTERVAL_DEFAULT;
THREAD_TIMER_OFF(ei->t_hello);
- thread_add_timer(master, eigrp_hello_timer, ei, 1,
- &ei->t_hello);
+ thread_add_timer(master, eigrp_hello_timer, ei, 1, &ei->t_hello);
return CMD_SUCCESS;
}
@@ -1008,11 +1005,9 @@ DEFUN (eigrp_authentication_keychain,
if (keychain != NULL) {
if (ei->params.auth_keychain) {
free(ei->params.auth_keychain);
- ei->params.auth_keychain =
- strdup(keychain->name);
+ ei->params.auth_keychain = strdup(keychain->name);
} else
- ei->params.auth_keychain =
- strdup(keychain->name);
+ ei->params.auth_keychain = strdup(keychain->name);
} else
vty_out(vty, "Key chain with specified name not found\n");
@@ -1339,8 +1334,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP,
struct in_addr nbr_addr;
if (!inet_aton(argv[4]->arg, &nbr_addr)) {
- vty_out(vty, "Unable to parse %s",
- argv[4]->arg);
+ vty_out(vty, "Unable to parse %s", argv[4]->arg);
return CMD_WARNING;
}
@@ -1446,8 +1440,7 @@ DEFUN (clear_ip_eigrp_neighbors_IP_soft,
struct in_addr nbr_addr;
if (!inet_aton(argv[4]->arg, &nbr_addr)) {
- vty_out(vty, "Unable to parse: %s",
- argv[4]->arg);
+ vty_out(vty, "Unable to parse: %s", argv[4]->arg);
return CMD_WARNING;
}
diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c
index e8392f50b..3a3d6aae1 100644
--- a/eigrpd/eigrp_zebra.c
+++ b/eigrpd/eigrp_zebra.c
@@ -114,7 +114,7 @@ static void eigrp_zebra_connected(struct zclient *zclient)
void eigrp_zebra_init(void)
{
- struct zclient_options opt = { .receive_notify = false };
+ struct zclient_options opt = {.receive_notify = false};
zclient = zclient_new_notify(master, &opt);
@@ -205,8 +205,7 @@ static int eigrp_interface_delete(int command, struct zclient *zclient,
ifp->metric, ifp->mtu);
if (ifp->info)
- eigrp_if_free(ifp->info,
- INTERFACE_DOWN_BY_ZEBRA);
+ eigrp_if_free(ifp->info, INTERFACE_DOWN_BY_ZEBRA);
if_set_index(ifp, IFINDEX_INTERNAL);
return 0;