diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-01-24 14:47:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-24 14:47:58 +0200 |
| commit | 1983a80dd603161dffca36d822ff0f9912a672e3 (patch) | |
| tree | d4f523c6e71828c67964930b60a40c2c87385df5 | |
| parent | e80ae3ec621a2a5aa5da07f9002778273444ff76 (diff) | |
| parent | 9795e9f23465f26628a75be15771a01427336dad (diff) | |
Merge pull request #12681 from pguibert6WIND/vpnv6_encode_plus
Vpnv6 encode plus
| -rw-r--r-- | bgpd/bgp_route.c | 8 | ||||
| -rw-r--r-- | bgpd/bgp_routemap.c | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 59d8544953..3f07e53bb6 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2273,8 +2273,12 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi, && peer->shared_network && (from == bgp->peer_self || peer->sort == BGP_PEER_EBGP))) { - attr->mp_nexthop_len = - BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL; + if (safi == SAFI_MPLS_VPN) + attr->mp_nexthop_len = + BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL; + else + attr->mp_nexthop_len = + BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL; } /* Clear off link-local nexthop in source, whenever it is not diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 1ce2eb4352..d00bdd2571 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3585,7 +3585,8 @@ route_set_ipv6_nexthop_local(void *rule, const struct prefix *p, void *object) path->attr->mp_nexthop_local = *address; /* Set nexthop length. */ - if (path->attr->mp_nexthop_len != BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) + if (path->attr->mp_nexthop_len != BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL && + path->attr->mp_nexthop_len != BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL) path->attr->mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL; SET_FLAG(path->attr->rmap_change_flags, |
