From: Ondrej Zajicek (work) Date: Thu, 23 Mar 2017 13:10:42 +0000 (+0100) Subject: BGP: Bugfix in VPN NLRI encoding X-Git-Tag: v2.0.0-pre1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01111fc42c461202d427260fb56807eac256e8d5;p=thirdparty%2Fbird.git BGP: Bugfix in VPN NLRI encoding --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 5953c43a7..5819965d5 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -1291,7 +1291,7 @@ bgp_encode_nlri_vpn4(struct bgp_write_state *s, struct bgp_bucket *buck, byte *b } /* Encode prefix length */ - *pos = net->pxlen; + *pos = 64 + net->pxlen; ADVANCE(pos, size, 1); /* Encode MPLS labels */ @@ -1417,7 +1417,7 @@ bgp_encode_nlri_vpn6(struct bgp_write_state *s, struct bgp_bucket *buck, byte *b } /* Encode prefix length */ - *pos = net->pxlen; + *pos = 64 + net->pxlen; ADVANCE(pos, size, 1); /* Encode MPLS labels */