]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: shared_network is a bool, convert it to such
authorDonald Sharp <sharpd@nvidia.com>
Thu, 5 Dec 2024 15:15:18 +0000 (10:15 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 5 Dec 2024 15:19:55 +0000 (10:19 -0500)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_zebra.c
bgpd/bgpd.h

index 688dfacaa0b6b990c6ba2f18085b29a77866c90d..ee1bdbc5bd3d8a67f1b12678244741f16c2707ea 100644 (file)
@@ -838,9 +838,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
                if (!v6_ll_avail && !peer->conf_if)
                        v6_ll_avail = true;
                if (if_lookup_by_ipv4(&remote->sin.sin_addr, peer->bgp->vrf_id))
-                       peer->shared_network = 1;
+                       peer->shared_network = true;
                else
-                       peer->shared_network = 0;
+                       peer->shared_network = false;
        }
 
        /* IPv6 connection, fetch and store IPv4 local address if any. */
@@ -903,9 +903,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
                    || if_lookup_by_ipv6(&remote->sin6.sin6_addr,
                                         remote->sin6.sin6_scope_id,
                                         peer->bgp->vrf_id))
-                       peer->shared_network = 1;
+                       peer->shared_network = true;
                else
-                       peer->shared_network = 0;
+                       peer->shared_network = false;
        }
 
 /* KAME stack specific treatment.  */
index df55d879e71d3a2726c8eea6de1203ed71c7a981..bb56fd355a051ae8b8c308048d864b5f99eea2c2 100644 (file)
@@ -1330,7 +1330,7 @@ struct peer {
 
        union sockunion *su_local;  /* Sockunion of local address.  */
        union sockunion *su_remote; /* Sockunion of remote address.  */
-       int shared_network;      /* Is this peer shared same network. */
+       bool shared_network;        /* Is this peer shared same network. */
        struct bgp_nexthop nexthop; /* Nexthop */
 
        /* Roles in bgp session */