mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:05:11 +00:00
pimd: fix SA reports
Fix a couple of SA warnings introduced recently; replace some 'strcpy' calls. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
f294fac22d
commit
ac74a3f266
@ -4779,11 +4779,11 @@ static void pim_show_mlag_up_entry_detail(struct vrf *vrf,
|
|||||||
|
|
||||||
own_str[0] = '\0';
|
own_str[0] = '\0';
|
||||||
if (pim_up_mlag_is_local(up))
|
if (pim_up_mlag_is_local(up))
|
||||||
strcpy(own_str + strlen(own_str), "L");
|
strlcat(own_str, "L", sizeof(own_str));
|
||||||
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
|
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
|
||||||
strcpy(own_str + strlen(own_str), "P");
|
strlcat(own_str, "P", sizeof(own_str));
|
||||||
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
|
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
|
||||||
strcpy(own_str + strlen(own_str), "I");
|
strlcat(own_str, "I", sizeof(own_str));
|
||||||
/* XXX - fixup, print paragraph output */
|
/* XXX - fixup, print paragraph output */
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"%-15s %-15s %-6s %-11u %-10d %2s\n",
|
"%-15s %-15s %-6s %-11u %-10d %2s\n",
|
||||||
@ -4824,20 +4824,20 @@ static void pim_show_mlag_up_detail(struct vrf *vrf,
|
|||||||
*/
|
*/
|
||||||
if (group) {
|
if (group) {
|
||||||
if (strcmp(src_str, src_or_group) ||
|
if (strcmp(src_str, src_or_group) ||
|
||||||
strcmp(grp_str, group))
|
strcmp(grp_str, group))
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(src_str, src_or_group) &&
|
if (strcmp(src_str, src_or_group) &&
|
||||||
strcmp(grp_str, src_or_group))
|
strcmp(grp_str, src_or_group))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pim_show_mlag_up_entry_detail(vrf, vty, up,
|
pim_show_mlag_up_entry_detail(vrf, vty, up,
|
||||||
src_str, grp_str, json);
|
src_str, grp_str, json);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uj) {
|
if (uj) {
|
||||||
vty_out(vty, "%s\n", json_object_to_json_string_ext(
|
vty_out(vty, "%s\n", json_object_to_json_string_ext(
|
||||||
json, JSON_C_TO_STRING_PRETTY));
|
json, JSON_C_TO_STRING_PRETTY));
|
||||||
json_object_free(json);
|
json_object_free(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4907,11 +4907,11 @@ static void pim_show_mlag_up_vrf(struct vrf *vrf, struct vty *vty, bool uj)
|
|||||||
|
|
||||||
own_str[0] = '\0';
|
own_str[0] = '\0';
|
||||||
if (pim_up_mlag_is_local(up))
|
if (pim_up_mlag_is_local(up))
|
||||||
strcpy(own_str + strlen(own_str), "L");
|
strlcat(own_str, "L", sizeof(own_str));
|
||||||
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
|
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_PEER))
|
||||||
strcpy(own_str + strlen(own_str), "P");
|
strlcat(own_str, "P", sizeof(own_str));
|
||||||
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
|
if (up->flags & (PIM_UPSTREAM_FLAG_MASK_MLAG_INTERFACE))
|
||||||
strcpy(own_str + strlen(own_str), "I");
|
strlcat(own_str, "I", sizeof(own_str));
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"%-15s %-15s %-6s %-11u %-10u %2s\n",
|
"%-15s %-15s %-6s %-11u %-10u %2s\n",
|
||||||
src_str, grp_str, own_str,
|
src_str, grp_str, own_str,
|
||||||
@ -4972,7 +4972,7 @@ DEFUN(show_ip_pim_mlag_up, show_ip_pim_mlag_up_cmd,
|
|||||||
|
|
||||||
pim_show_mlag_help_string(vty, uj);
|
pim_show_mlag_help_string(vty, uj);
|
||||||
|
|
||||||
if (src_or_group || group)
|
if (src_or_group)
|
||||||
pim_show_mlag_up_detail(vrf, vty, src_or_group, group, uj);
|
pim_show_mlag_up_detail(vrf, vty, src_or_group, group, uj);
|
||||||
else
|
else
|
||||||
pim_show_mlag_up_vrf(vrf, vty, uj);
|
pim_show_mlag_up_vrf(vrf, vty, uj);
|
||||||
|
@ -1099,9 +1099,9 @@ void pim_vxlan_add_term_dev(struct pim_instance *pim,
|
|||||||
|
|
||||||
if (PIM_DEBUG_VXLAN)
|
if (PIM_DEBUG_VXLAN)
|
||||||
zlog_debug("vxlan term oif cfg changed from %s to %s",
|
zlog_debug("vxlan term oif cfg changed from %s to %s",
|
||||||
pim->vxlan.term_if_cfg ?
|
pim->vxlan.term_if_cfg ?
|
||||||
pim->vxlan.term_if_cfg->name : "-",
|
pim->vxlan.term_if_cfg->name : "-",
|
||||||
ifp->name);
|
ifp->name);
|
||||||
|
|
||||||
pim->vxlan.term_if_cfg = ifp;
|
pim->vxlan.term_if_cfg = ifp;
|
||||||
|
|
||||||
@ -1117,8 +1117,8 @@ void pim_vxlan_add_term_dev(struct pim_instance *pim,
|
|||||||
* vxlan termination device
|
* vxlan termination device
|
||||||
*/
|
*/
|
||||||
pim_if_create_pimreg(pim);
|
pim_if_create_pimreg(pim);
|
||||||
pim_ifp = pim_if_new(ifp, false /*igmp*/, true /*pim*/,
|
(void)pim_if_new(ifp, false /*igmp*/, true /*pim*/,
|
||||||
false /*pimreg*/, true /*vxlan_term*/);
|
false /*pimreg*/, true /*vxlan_term*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user