summaryrefslogtreecommitdiff
path: root/lib/stream.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2017-07-10 15:05:13 -0400
committerGitHub <noreply@github.com>2017-07-10 15:05:13 -0400
commitbe2ddfff10343de8cb2e357f1052ffb2448ea830 (patch)
treec8694738b7b4b532d7db5a366e7f5bd534d7301a /lib/stream.c
parent1e5e04888f54b85350117ef52776761506e1f983 (diff)
parent41e3491695029e917ad17991e4de43544aef523b (diff)
Merge pull request #733 from dwalton76/bgpd-ipv4-plus-label-misc3
bgpd: Install SAFI_LABELED_UNICAST routes in SAFI_UNICAST table
Diffstat (limited to 'lib/stream.c')
-rw-r--r--lib/stream.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/stream.c b/lib/stream.c
index e8320a8fa1..6163a5b3ec 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -920,9 +920,10 @@ stream_put_prefix (struct stream *s, struct prefix *p)
/* Put NLRI with label */
int
-stream_put_labeled_prefix (struct stream *s, struct prefix *p, u_char *label)
+stream_put_labeled_prefix (struct stream *s, struct prefix *p, mpls_label_t *label)
{
size_t psize;
+ u_char *label_pnt = (u_char *) label;
STREAM_VERIFY_SANE(s);
@@ -935,9 +936,9 @@ stream_put_labeled_prefix (struct stream *s, struct prefix *p, u_char *label)
}
stream_putc (s, (p->prefixlen + 24));
- stream_putc(s, label[0]);
- stream_putc(s, label[1]);
- stream_putc(s, label[2]);
+ stream_putc(s, label_pnt[0]);
+ stream_putc(s, label_pnt[1]);
+ stream_putc(s, label_pnt[2]);
memcpy (s->data + s->endp, &p->u.prefix, psize);
s->endp += psize;