summaryrefslogtreecommitdiff
path: root/bgpd/bgp_updgrp_packet.c
diff options
context:
space:
mode:
authorBiswajit Sadhu <sadhub@vmware.com>2019-04-27 04:27:21 -0700
committerBiswajit Sadhu <sadhub@vmware.com>2019-04-27 04:27:21 -0700
commit737af8857aab57d7fdeaffc5b9a72684e2dbb2d4 (patch)
tree397821d3b136ba6504ba547ff706ad187fa7db41 /bgpd/bgp_updgrp_packet.c
parent86336f620f6e175e5552085877fa02ffaf9591b1 (diff)
bgpd: Prevent the ebgp ipv6 sender from changing of nexthop in a special case.
Prevent the ebgp sender from changing the nexthop( which is same as the ebgp neighbour ipv6 address), while sending updates to its ipv6 neighbor.So,if the nexthop of the ipv6 route is same as the ipv6 neighbour address do not change the next hop to your own ip. Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
-rw-r--r--bgpd/bgp_updgrp_packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index 66e306cba2..c02e537155 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -554,9 +554,9 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
mod_v6nhg = &peer->nexthop.v6_global;
gnh_modified = 1;
} else if (
- peer->sort == BGP_PEER_EBGP
- && !CHECK_FLAG(
- vec->flags,
+ (peer->sort == BGP_PEER_EBGP)
+ && (!bgp_multiaccess_check_v6(v6nhglobal, peer))
+ && !CHECK_FLAG(vec->flags,
BPKT_ATTRVEC_FLAGS_RMAP_NH_UNCHANGED)
&& !peer_af_flag_check(
peer, nhafi, paf->safi,