summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-03-23 14:10:42 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-03-23 14:10:42 +0100
commit01111fc42c461202d427260fb56807eac256e8d5 (patch)
tree3cd06d586c88621e9273baa4bbcaad4cf9893e6a /proto/bgp
parent1e37e35c3ea88672c677ea7ac63fe0b9df609b0c (diff)
BGP: Bugfix in VPN NLRI encoding
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/packets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index 5953c43a..5819965d 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 */