summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_attr.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index e9050c5aec..b2d7bdcef4 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -3887,13 +3887,6 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi,
} break;
case SAFI_MPLS_VPN: {
if (attr->mp_nexthop_len
- == BGP_ATTR_NHLEN_IPV6_GLOBAL) {
- stream_putc(s, 24);
- stream_putl(s, 0); /* RD = 0, per RFC */
- stream_putl(s, 0);
- stream_put(s, &attr->mp_nexthop_global,
- IPV6_MAX_BYTELEN);
- } else if (attr->mp_nexthop_len
== BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) {
stream_putc(s, 48);
stream_putl(s, 0); /* RD = 0, per RFC */
@@ -3904,6 +3897,12 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi,
stream_putl(s, 0);
stream_put(s, &attr->mp_nexthop_local,
IPV6_MAX_BYTELEN);
+ } else {
+ stream_putc(s, 24);
+ stream_putl(s, 0); /* RD = 0, per RFC */
+ stream_putl(s, 0);
+ stream_put(s, &attr->mp_nexthop_global,
+ IPV6_MAX_BYTELEN);
}
} break;
case SAFI_ENCAP: