summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-07-22 14:52:33 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-07-22 14:52:33 +0200
commit9d303b37d73b8fe2bef310d8d9ca1acad23c2501 (patch)
treebbe78c595bd8f42b76322df2a37cf81f60c08a6a /pimd
parent*: add git-reindent-branch.py (diff)
downloadfrr-9d303b37d73b8fe2bef310d8d9ca1acad23c2501.tar.xz
frr-9d303b37d73b8fe2bef310d8d9ca1acad23c2501.zip
Revert "*: reindent pt. 2"
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_assert.c6
-rw-r--r--pimd/pim_cmd.c148
-rw-r--r--pimd/pim_iface.h7
-rw-r--r--pimd/pim_ifchannel.c5
-rw-r--r--pimd/pim_main.c5
-rw-r--r--pimd/pim_msdp.c8
-rw-r--r--pimd/pim_msdp.h12
-rw-r--r--pimd/pim_register.c5
-rw-r--r--pimd/pim_rp.c5
-rw-r--r--pimd/pim_zlookup.c5
10 files changed, 85 insertions, 121 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c
index e1c961491..f68c252a3 100644
--- a/pimd/pim_assert.c
+++ b/pimd/pim_assert.c
@@ -404,9 +404,9 @@ int pim_assert_build_msg(uint8_t *pim_msg, int buf_size, struct interface *ifp,
}
/* Metric preference */
- pim_write_uint32(pim_msg_curr, rpt_bit_flag
- ? metric_preference | 0x80000000
- : metric_preference);
+ pim_write_uint32(pim_msg_curr,
+ rpt_bit_flag ? metric_preference | 0x80000000
+ : metric_preference);
pim_msg_curr += 4;
/* Route metric */
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 07678159d..1c9fe40c2 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -423,9 +423,8 @@ static void pim_show_membership(struct vty *vty, u_char uj)
} /* scan interface channels */
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
} else {
vty_out(vty,
"Interface Address Source Group Membership\n");
@@ -589,9 +588,8 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -786,9 +784,8 @@ static void igmp_show_interfaces_single(struct vty *vty, const char *ifname,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else {
if (!found_ifname)
@@ -1168,8 +1165,9 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname,
print_header = 1;
for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, upnode,
up)) {
- if (strcmp(ifp->name, up->rpf.source_nexthop
- .interface->name)
+ if (strcmp(ifp->name,
+ up->rpf.source_nexthop
+ .interface->name)
== 0) {
if (up->flags
& PIM_UPSTREAM_FLAG_MASK_FHR) {
@@ -1256,9 +1254,8 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else {
if (!found_ifname)
@@ -1317,9 +1314,8 @@ static void pim_show_interfaces(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
} else {
vty_out(vty,
"Interface State Address PIM Nbrs PIM DR FHR IfChannels\n");
@@ -1436,9 +1432,8 @@ static void pim_show_interface_traffic(struct vty *vty, u_char uj)
}
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -1523,9 +1518,8 @@ static void pim_show_interface_traffic_single(struct vty *vty,
}
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else {
if (!found_ifname)
@@ -1628,9 +1622,8 @@ static void pim_show_join(struct vty *vty, u_char uj)
} /* scan interface channels */
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -1833,9 +1826,8 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else {
{
@@ -2039,9 +2031,8 @@ static void pim_show_state(struct vty *vty, const char *src_or_group,
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else {
vty_out(vty, "\n");
@@ -2124,9 +2115,8 @@ static void pim_show_neighbors(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -2356,9 +2346,8 @@ static void pim_show_upstream(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -2442,9 +2431,8 @@ static void pim_show_join_desired(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -2481,10 +2469,7 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj)
pim_addr_dump("<rpf?>", &rpf->rpf_addr, rpf_addr_str,
sizeof(rpf_addr_str));
- rpf_ifname =
- rpf->source_nexthop.interface ? rpf->source_nexthop
- .interface->name
- : "<ifname?>";
+ rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>";
if (uj) {
json_object_object_get_ex(json, grp_str, &json_group);
@@ -2514,9 +2499,8 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -2620,10 +2604,7 @@ static void pim_show_rpf(struct vty *vty, u_char uj)
&rpf->source_nexthop.mrib_nexthop_addr,
rib_nexthop_str, sizeof(rib_nexthop_str));
- rpf_ifname =
- rpf->source_nexthop.interface ? rpf->source_nexthop
- .interface->name
- : "<ifname?>";
+ rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>";
if (uj) {
json_object_object_get_ex(json, grp_str, &json_group);
@@ -2661,9 +2642,8 @@ static void pim_show_rpf(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -2822,9 +2802,8 @@ static void igmp_show_groups(struct vty *vty, u_char uj)
} /* scan interfaces */
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -4060,9 +4039,8 @@ static void show_mroute(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -4655,9 +4633,8 @@ static void ip_pim_ssm_show_group_range(struct vty *vty, u_char uj)
json_object *json;
json = json_object_new_object();
json_object_string_add(json, "ssmGroups", range_str);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
vty_out(vty, "SSM group range : %s\n", range_str);
@@ -4699,9 +4676,8 @@ static void ip_pim_ssm_show_group_type(struct vty *vty, u_char uj,
json_object *json;
json = json_object_new_object();
json_object_string_add(json, "groupType", type_str);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
} else
vty_out(vty, "Group type : %s\n", type_str);
@@ -6453,8 +6429,7 @@ DEFUN (ip_pim_bfd_param,
}
ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd,
- "no ip pim bfd (2-255) (50-60000) (50-60000)",
- NO_STR IP_STR PIM_STR
+ "no ip pim bfd (2-255) (50-60000) (50-60000)", NO_STR IP_STR PIM_STR
"Enables BFD support\n"
"Detect Multiplier\n"
"Required min receive interval\n"
@@ -6815,9 +6790,8 @@ static void ip_msdp_show_mesh_group(struct vty *vty, u_char uj)
if (uj) {
json_object_object_add(json, mg->mesh_group_name, json_mg_row);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -6884,9 +6858,8 @@ static void ip_msdp_show_peers(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -6990,9 +6963,8 @@ static void ip_msdp_show_peers_detail(struct vty *vty, const char *peer,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -7089,9 +7061,8 @@ static void ip_msdp_show_sa(struct vty *vty, u_char uj)
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -7182,9 +7153,8 @@ static void ip_msdp_show_sa_detail(struct vty *vty, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -7227,9 +7197,8 @@ static void ip_msdp_show_sa_addr(struct vty *vty, const char *addr, u_char uj)
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
@@ -7257,9 +7226,8 @@ static void ip_msdp_show_sa_sg(struct vty *vty, const char *src,
}
if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index 5165f7890..e742e68f6 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -78,9 +78,10 @@ struct pim_interface {
struct in_addr update_source; /* user can statically set the primary
* address of the interface */
- int igmp_version; /* IGMP version */
- int igmp_default_robustness_variable; /* IGMPv3 QRV */
- int igmp_default_query_interval; /* IGMPv3 secs between general
+ int igmp_version; /* IGMP version */
+ int igmp_default_robustness_variable; /* IGMPv3 QRV */
+ int
+ igmp_default_query_interval; /* IGMPv3 secs between general
queries */
int igmp_query_max_response_time_dsec; /* IGMPv3 Max Response Time in
dsecs for general queries */
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c
index cd9da1f53..d4916518e 100644
--- a/pimd/pim_ifchannel.c
+++ b/pimd/pim_ifchannel.c
@@ -814,9 +814,8 @@ void pim_ifchannel_join_add(struct interface *ifp, struct in_addr neigh_addr,
/*
* If we are going to be a LHR, we need to note it
*/
- if (ch->upstream->parent
- && (ch->upstream->parent->flags
- & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
+ if (ch->upstream->parent && (ch->upstream->parent->flags
+ & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP)
&& !(ch->upstream->flags
& PIM_UPSTREAM_FLAG_MASK_SRC_LHR)) {
pim_upstream_ref(ch->upstream,
diff --git a/pimd/pim_main.c b/pimd/pim_main.c
index ecaafaa58..b8e6d8ad3 100644
--- a/pimd/pim_main.c
+++ b/pimd/pim_main.c
@@ -53,10 +53,7 @@ struct option longopts[] = {{0}};
/* pimd privileges */
zebra_capabilities_t _caps_p[] = {
- ZCAP_NET_ADMIN,
- ZCAP_SYS_ADMIN,
- ZCAP_NET_RAW,
- ZCAP_BIND,
+ ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN, ZCAP_NET_RAW, ZCAP_BIND,
};
/* pimd privileges to run with */
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index 648bc1d5b..0f653e70a 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -793,10 +793,10 @@ static void pim_msdp_peer_listen(struct pim_msdp_peer *mp)
}
/* this is interntionally asymmetric i.e. we set up listen-socket when
- * the
- * first listening peer is configured; but don't bother tearing it down
- * when
- * all the peers go down */
+ * the
+ * first listening peer is configured; but don't bother tearing it down
+ * when
+ * all the peers go down */
pim_msdp_sock_listen();
}
diff --git a/pimd/pim_msdp.h b/pimd/pim_msdp.h
index 971994136..66e5457df 100644
--- a/pimd/pim_msdp.h
+++ b/pimd/pim_msdp.h
@@ -69,7 +69,7 @@ enum pim_msdp_sa_flags {
PIM_MSDP_SAF_PEER = (1 << 1),
PIM_MSDP_SAF_REF = (PIM_MSDP_SAF_LOCAL | PIM_MSDP_SAF_PEER),
PIM_MSDP_SAF_STALE = (1 << 2), /* local entries can get kicked out on
- * misc pim events such as RP change */
+ * misc pim events such as RP change */
PIM_MSDP_SAF_UP_DEL_IN_PROG = (1 << 3)
};
@@ -116,13 +116,13 @@ struct pim_msdp_peer {
#define PIM_MSDP_PEER_HOLD_TIME 75
struct thread *hold_timer; // 5.4
/* $FRR indent$ */
- /* clang-format off */
+/* clang-format off */
#define PIM_MSDP_PEER_KA_TIME 60
- struct thread *ka_timer; // 5.5
- /* $FRR indent$ */
- /* clang-format off */
+ struct thread *ka_timer; // 5.5
+ /* $FRR indent$ */
+ /* clang-format off */
#define PIM_MSDP_PEER_CONNECT_RETRY_TIME 30
- struct thread *cr_timer; // 5.6
+ struct thread *cr_timer; // 5.6
/* packet thread and buffers */
uint32_t packet_size;
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 2210a91f9..1cbe1dcf7 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -330,9 +330,8 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
pim_str_sg_dump(&sg), src_str, ifp->name, i_am_rp);
}
- if (i_am_rp
- && (dest_addr.s_addr
- == ((RP(sg.grp))->rpf_addr.u.prefix4.s_addr))) {
+ if (i_am_rp && (dest_addr.s_addr
+ == ((RP(sg.grp))->rpf_addr.u.prefix4.s_addr))) {
sentRegisterStop = 0;
if (*bits & PIM_REGISTER_BORDER_BIT) {
diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c
index 4c5722e35..2fe0143a8 100644
--- a/pimd/pim_rp.c
+++ b/pimd/pim_rp.c
@@ -948,9 +948,8 @@ void pim_rp_show_information(struct vty *vty, u_char uj)
inet_ntoa(prev_rp_info->rp.rpf_addr.u.prefix4),
json_rp_rows);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
+ vty_out(vty, "%s\n", json_object_to_json_string_ext(
+ json, JSON_C_TO_STRING_PRETTY));
json_object_free(json);
}
}
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index 5258377cc..027b18e12 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -435,8 +435,9 @@ int zclient_lookup_nexthop(struct pim_zlookup_nexthop nexthop_tab[],
nexthop_tab[0].route_metric);
}
- addr = nexthop_addr.u.prefix4; /* use nexthop addr for
- recursive lookup */
+ addr =
+ nexthop_addr.u.prefix4; /* use nexthop addr for
+ recursive lookup */
} /* for (max_lookup) */