summaryrefslogtreecommitdiffstats
path: root/pimd/pim_nb_config.c
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2022-02-16 09:04:13 +0100
committerMobashshera Rasool <mrasool@vmware.com>2022-03-08 09:57:51 +0100
commitcafbb61955c8d422461bbf5f952d5a8dae5edcc3 (patch)
tree2df8d190ec5a09a6e4ebf35f8b860db754520e21 /pimd/pim_nb_config.c
parentpim6d: Modify pim_*_cmd_worker api passing pim_addr parameter (diff)
downloadfrr-cafbb61955c8d422461bbf5f952d5a8dae5edcc3.tar.xz
frr-cafbb61955c8d422461bbf5f952d5a8dae5edcc3.zip
pim6d: Convert %s to %pPA for RP Addresses
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'pimd/pim_nb_config.c')
-rw-r--r--pimd/pim_nb_config.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c
index c10f7daf5..629490408 100644
--- a/pimd/pim_nb_config.c
+++ b/pimd/pim_nb_config.c
@@ -260,16 +260,13 @@ static int pim_rp_cmd_worker(struct pim_instance *pim, pim_addr rp_addr,
struct prefix group, const char *plist,
char *errmsg, size_t errmsg_len)
{
- char rp_str[INET_ADDRSTRLEN];
int result;
- inet_ntop(AF_INET, &rp_addr, rp_str, sizeof(rp_str));
-
result = pim_rp_new(pim, rp_addr, group, plist, RP_SRC_STATIC);
if (result == PIM_RP_NO_PATH) {
- snprintf(errmsg, errmsg_len,
- "No Path to RP address specified: %s", rp_str);
+ snprintfrr(errmsg, errmsg_len,
+ "No Path to RP address specified: %pPA", &rp_addr);
return NB_ERR_INCONSISTENCY;
}
@@ -298,11 +295,9 @@ static int pim_no_rp_cmd_worker(struct pim_instance *pim, pim_addr rp_addr,
struct prefix group, const char *plist,
char *errmsg, size_t errmsg_len)
{
- char rp_str[INET_ADDRSTRLEN];
char group_str[PREFIX2STR_BUFFER];
int result;
- inet_ntop(AF_INET, &rp_addr, rp_str, sizeof(rp_str));
prefix2str(&group, group_str, sizeof(group_str));
result = pim_rp_del(pim, rp_addr, group, plist, RP_SRC_STATIC);
@@ -314,8 +309,8 @@ static int pim_no_rp_cmd_worker(struct pim_instance *pim, pim_addr rp_addr,
}
if (result == PIM_RP_BAD_ADDRESS) {
- snprintf(errmsg, errmsg_len,
- "Bad RP address specified: %s", rp_str);
+ snprintfrr(errmsg, errmsg_len, "Bad RP address specified: %pPA",
+ &rp_addr);
return NB_ERR_INCONSISTENCY;
}