summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2019-09-17 13:33:05 +0200
committerGitHub <noreply@github.com>2019-09-17 13:33:05 +0200
commit1fcc189f24d6e8404668fa13c4e94c67e77c293c (patch)
tree48aba3f5422f36e816bee38cf22d4b303ec66ab8
parentMerge pull request #4887 from vishaldhingra/lcomm_json (diff)
parentbgpd: prefer-global command not working on IPv4 peers (diff)
downloadfrr-1fcc189f24d6e8404668fa13c4e94c67e77c293c.tar.xz
frr-1fcc189f24d6e8404668fa13c4e94c67e77c293c.zip
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 e7521c62f..cb3d79436 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,