summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-10-10 18:19:37 +0200
committerGitHub <noreply@github.com>2017-10-10 18:19:37 +0200
commit5d920111b9d5b460052a257656f58d8c093c236f (patch)
tree74d5c1722575843d62d95f32f41729cf32854d8a /zebra/rt_netlink.c
parentMerge pull request #1315 from dslicenc/bgp-interface (diff)
parentzebra: use a switch statement in nexthop_set_resolved() (diff)
downloadfrr-5d920111b9d5b460052a257656f58d8c093c236f.tar.xz
frr-5d920111b9d5b460052a257656f58d8c093c236f.zip
Merge pull request #1210 from opensourcerouting/misc-mpls-bgp-lu-fixes
Misc BGP-LU fixes
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 0e4ae0433..0cc2e0217 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -845,7 +845,7 @@ static void _netlink_route_build_singlepath(const char *routedesc, int bytelen,
{
struct nexthop_label *nh_label;
mpls_lse_t out_lse[MPLS_MAX_LABELS];
- char label_buf[100];
+ char label_buf[256];
/*
* label_buf is *only* currently used within debugging.
@@ -876,12 +876,13 @@ static void _netlink_route_build_singlepath(const char *routedesc, int bytelen,
0, 0, bos);
if (IS_ZEBRA_DEBUG_KERNEL) {
if (!num_labels)
- sprintf(label_buf, "label %d",
+ sprintf(label_buf, "label %u",
nh_label->label[i]);
else {
- sprintf(label_buf1, "/%d",
+ sprintf(label_buf1, "/%u",
nh_label->label[i]);
- strcat(label_buf, label_buf1);
+ strlcat(label_buf, label_buf1,
+ sizeof(label_buf));
}
}
num_labels++;
@@ -1044,7 +1045,7 @@ static void _netlink_route_build_multipath(const char *routedesc, int bytelen,
{
struct nexthop_label *nh_label;
mpls_lse_t out_lse[MPLS_MAX_LABELS];
- char label_buf[100];
+ char label_buf[256];
rtnh->rtnh_len = sizeof(*rtnh);
rtnh->rtnh_flags = 0;
@@ -1080,12 +1081,13 @@ static void _netlink_route_build_multipath(const char *routedesc, int bytelen,
0, 0, bos);
if (IS_ZEBRA_DEBUG_KERNEL) {
if (!num_labels)
- sprintf(label_buf, "label %d",
+ sprintf(label_buf, "label %u",
nh_label->label[i]);
else {
- sprintf(label_buf1, "/%d",
+ sprintf(label_buf1, "/%u",
nh_label->label[i]);
- strcat(label_buf, label_buf1);
+ strlcat(label_buf, label_buf1,
+ sizeof(label_buf));
}
}
num_labels++;