]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Bugfix in VPN NLRI encoding
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 23 Mar 2017 13:10:42 +0000 (14:10 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 23 Mar 2017 13:10:42 +0000 (14:10 +0100)
proto/bgp/packets.c

index 5953c43a760c35c819d12ab217115d35d8c47d93..5819965d573e78a02f7d21feb88a05227f45ba4d 100644 (file)
@@ -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 */