summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_flowspec_util.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-10-18 13:33:54 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-10-22 08:07:41 +0200
commit2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (patch)
tree69c38032b07630b46d2d5852200789b13392153c /bgpd/bgp_flowspec_util.c
parentMerge pull request #7353 from AnuradhaKaruppiah/mh-cleanup-fix-1 (diff)
downloadfrr-2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1.tar.xz
frr-2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1.zip
:* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_flowspec_util.c')
-rw-r--r--bgpd/bgp_flowspec_util.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bgpd/bgp_flowspec_util.c b/bgpd/bgp_flowspec_util.c
index 90e923638..55e7973f8 100644
--- a/bgpd/bgp_flowspec_util.c
+++ b/bgpd/bgp_flowspec_util.c
@@ -20,6 +20,8 @@
#include "zebra.h"
+#include "lib/printfrr.h"
+
#include "prefix.h"
#include "lib_errors.h"
@@ -211,14 +213,11 @@ int bgp_flowspec_ip_address(enum bgp_flowspec_util_nlri_t type,
switch (type) {
case BGP_FLOWSPEC_RETURN_STRING:
if (prefix_local.family == AF_INET6) {
- char str[BGP_FLOWSPEC_STRING_DISPLAY_MAX];
int ret;
- prefix2str(&prefix_local, str,
- BGP_FLOWSPEC_STRING_DISPLAY_MAX);
- ret = snprintf(display, BGP_FLOWSPEC_STRING_DISPLAY_MAX,
- "%s/off %u",
- str, prefix_offset);
+ ret = snprintfrr(
+ display, BGP_FLOWSPEC_STRING_DISPLAY_MAX,
+ "%pFX/off %u", &prefix_local, prefix_offset);
if (ret < 0) {
*error = -1;
break;