summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2019-09-17 07:33:05 -0400
committerGitHub <noreply@github.com>2019-09-17 07:33:05 -0400
commit1fcc189f24d6e8404668fa13c4e94c67e77c293c (patch)
tree48aba3f5422f36e816bee38cf22d4b303ec66ab8
parentaa83afaaa5477fe0727e07b94a342b33365a8381 (diff)
parentc5ca731e6433559bb5ed5a62deaef7f39ef89432 (diff)
Merge pull request #4970 from shikenghua/prefer_global
bgpd: prefer-global command not working on IPv4 peers
-rw-r--r--bgpd/bgp_routemap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index e7521c62ff..cb3d79436d 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2748,10 +2748,8 @@ route_set_ipv6_nexthop_prefer_global(void *rule, const struct prefix *prefix,
path = object;
peer = path->peer;
- if ((CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IN)
- || CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IMPORT))
- && peer->su_remote
- && sockunion_family(peer->su_remote) == AF_INET6) {
+ if (CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IN)
+ || CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IMPORT)) {
/* Set next hop preference to global */
path->attr->mp_nexthop_prefer_global = true;
SET_FLAG(path->attr->rmap_change_flags,