diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-08-21 13:40:18 -0500 | 
|---|---|---|
| committer | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-08-22 10:38:09 -0500 | 
| commit | 741c0303952294d670c9194404f741c3033de4a3 (patch) | |
| tree | 6e626869cf2d638c0f9c78fb5013d0905c17b8e9 /bgpd/bgp_updgrp_packet.c | |
| parent | 0097489b4a5b0270a4abedcb885b215efc3ff622 (diff) | |
Revert "Merge pull request #15368 from louis-6wind/fix-6pe"
This reverts commit df98e8836897135b34080909bb6c4d91218a8e59, reversing
changes made to b6521192354df3f614b244323876e43dd0b58e56.
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
| -rw-r--r-- | bgpd/bgp_updgrp_packet.c | 15 | 
1 files changed, 5 insertions, 10 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index b359b2c253..8cd851b9ac 100644 --- a/bgpd/bgp_updgrp_packet.c +++ b/bgpd/bgp_updgrp_packet.c @@ -523,16 +523,11 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,  			gnh_modified = 1;  		} -		if (peer->nexthop.v4.s_addr != INADDR_ANY && -		    (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg) || -		     (peer->connection->su.sa.sa_family == AF_INET && -		      paf->afi == AFI_IP6))) { -			/* set a IPv4 mapped IPv6 address if no global IPv6 -			 * address is found or if announcing IPv6 prefix -			 * over an IPv4 BGP session. -			 */ -			ipv4_to_ipv4_mapped_ipv6(mod_v6nhg, peer->nexthop.v4); -			gnh_modified = 1; +		if (IN6_IS_ADDR_UNSPECIFIED(mod_v6nhg)) { +			if (peer->nexthop.v4.s_addr != INADDR_ANY) { +				ipv4_to_ipv4_mapped_ipv6(mod_v6nhg, +							 peer->nexthop.v4); +			}  		}  		if (IS_MAPPED_IPV6(&peer->nexthop.v6_global)) {  | 
