Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert IPv4 mapped IPv6 stuff for 10.1 #16587

Revert "topotests: add an ebgp 6vpe test"

b1edf38
Select commit
Loading
Failed to load commit list.
Merged

Revert IPv4 mapped IPv6 stuff for 10.1 #16587

Revert "topotests: add an ebgp 6vpe test"
b1edf38
Select commit
Loading
Failed to load commit list.
frrbot / frrbot completed Aug 14, 2024 in 10s

Style and/or linter errors found

Style and/or linter errors found

Details

Thanks for your contribution to FRR!

Click for style suggestions

diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c
index dc6dc54a3..83cdbfb0a 100644
--- a/bgpd/bgp_nht.c
+++ b/bgpd/bgp_nht.c
@@ -1041,8 +1041,8 @@ static int make_prefix(int afi, struct bgp_path_info *pi, struct prefix *p)
 			p->prefixlen = p_orig->prefixlen;
 		} else {
 			if (IS_MAPPED_IPV6(&pi->attr->mp_nexthop_global)) {
-				ipv4_mapped_ipv6_to_ipv4(
-					&pi->attr->mp_nexthop_global, &ipv4);
+				ipv4_mapped_ipv6_to_ipv4(&pi->attr->mp_nexthop_global,
+							 &ipv4);
 				p->u.prefix4 = ipv4;
 				p->prefixlen = IPV4_MAX_BITLEN;
 			} else {
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index c3b93adc2..f3ea6e117 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -332,8 +332,8 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS)
 		 * check to kick off any BGP interface-based neighbors,
 		 * but only if this is a link-local address.
 		 */
-		if (IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6)
-		    && !list_isempty(ifc->ifp->nbr_connected))
+		if (IN6_IS_ADDR_LINKLOCAL(&ifc->address->u.prefix6) &&
+		    !list_isempty(ifc->ifp->nbr_connected))
 			bgp_start_interface_nbrs(bgp, ifc->ifp);
 		else {
 			addr = ifc->address;
@@ -356,17 +356,14 @@ static int bgp_interface_address_add(ZAPI_CALLBACK_ARGS)
 				     (strcmp(peer->conf_if, ifc->ifp->name) ==
 				      0)) &&
 				    !IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) &&
-				    ((IS_MAPPED_IPV6(
-					     &peer->nexthop.v6_global)) ||
+				    ((IS_MAPPED_IPV6(&peer->nexthop.v6_global)) ||
 				     IN6_IS_ADDR_LINKLOCAL(
 					     &peer->nexthop.v6_global))) {
-
 					if (bgp_debug_zebra(ifc->address)) {
-						zlog_debug(
-							"Update peer %pBP's current intf addr %pI6 and send updates",
-							peer,
-							&peer->nexthop
-								 .v6_global);
+						zlog_debug("Update peer %pBP's current intf addr %pI6 and send updates",
+							   peer,
+							   &peer->nexthop
+								    .v6_global);
 					}
 					memcpy(&peer->nexthop.v6_global,
 					       &addr->u.prefix6,
@@ -422,10 +419,9 @@ static int bgp_interface_address_delete(ZAPI_CALLBACK_ARGS)
 			if (addr->family == AF_INET)
 				continue;
 
-			if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6)
-			    && memcmp(&peer->nexthop.v6_global,
-				      &addr->u.prefix6, 16)
-				       == 0) {
+			if (!IN6_IS_ADDR_LINKLOCAL(&addr->u.prefix6) &&
+			    memcmp(&peer->nexthop.v6_global, &addr->u.prefix6,
+				   16) == 0) {
 				memset(&peer->nexthop.v6_global, 0, 16);
 				FOREACH_AFI_SAFI (afi, safi)
 					bgp_announce_route(peer, afi, safi,

To apply the style suggestions:

curl https://gist.githubusercontent.com/polychaeta/86f785903c4e828726d57f8c87c15593/raw/a04d4c95c3baaf4a99781959678c6afb54862d07/style.diff | git apply -

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.