Skip to content

Commit

Permalink
Revert "bgpd: set ipv4-mapped ipv6 for ipv4 with ipv6 nexthop"
Browse files Browse the repository at this point in the history
This reverts commit 0b3f059.
  • Loading branch information
louis-6wind committed Apr 5, 2024
1 parent d83ca3f commit 48794a0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions bgpd/bgp_updgrp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +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) ||
(IN6_IS_ADDR_LINKLOCAL(mod_v6nhg) &&
peer->connection->su.sa.sa_family == AF_INET6 &&
paf->afi == AFI_IP))) {
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)) {
Expand Down

0 comments on commit 48794a0

Please sign in to comment.