]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #11684 from donaldsharp/cleanup_for_dev_builds
authorRuss White <russ@riw.us>
Tue, 2 Aug 2022 13:02:55 +0000 (09:02 -0400)
committerGitHub <noreply@github.com>
Tue, 2 Aug 2022 13:02:55 +0000 (09:02 -0400)
Cleanup for dev builds

bgpd/bgp_zebra.c
lib/sockopt.c
ospfd/ospf_abr.c
ospfd/ospf_flood.c
zebra/if_ioctl.c

index 2151d0a613f8e7d5816bb3f7df22be564ad7d506..2f2784c3cc7c1eb0dcdfe4f0bb01d485418206e2 100644 (file)
@@ -1000,19 +1000,13 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p,
                                p, &path->attr->nexthop);
                }
                if (p->family == AF_INET6) {
-                       char buf[2][INET6_ADDRSTRLEN];
                        ifindex_t ifindex;
                        struct in6_addr *nexthop;
 
                        nexthop = bgp_path_info_to_ipv6_nexthop(path, &ifindex);
                        zlog_debug(
-                               "Zebra rmap deny: IPv6 route %pFX nexthop %s",
-                               p,
-                               nexthop ? inet_ntop(AF_INET6, nexthop, buf[1],
-                                                   sizeof(buf[1]))
-                                       : inet_ntop(AF_INET,
-                                                   &path->attr->nexthop,
-                                                   buf[1], sizeof(buf[1])));
+                               "Zebra rmap deny: IPv6 route %pFX nexthop %pI6",
+                               p, nexthop);
                }
        }
        return false;
index 45f3c2333073143e07c130afc55eb61c356340f6..5bdd506a730d20f503a5f29471786346e3521c9d 100644 (file)
@@ -268,12 +268,9 @@ int setsockopt_ipv4_multicast(int sock, int optname, struct in_addr if_addr,
            && (errno == EADDRINUSE)) {
                /* see above: handle possible problem when interface comes back
                 * up */
-               char buf[1][INET_ADDRSTRLEN];
                zlog_info(
-                       "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)",
-                       sock, inet_ntop(AF_INET, &mreqn.imr_multiaddr, buf[0],
-                                       sizeof(buf[0])),
-                       ifindex);
+                       "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %pI4, ifindex %u)",
+                       sock, &mreqn.imr_multiaddr, ifindex);
                setsockopt(sock, IPPROTO_IP, IP_DROP_MEMBERSHIP, (void *)&mreqn,
                           sizeof(mreqn));
                ret = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
index 7aa3a27c604d29d161de0469d87ce58c19f34fc9..13243a55af19a337b46e70932bbb54dbf4bb0347 100644 (file)
@@ -350,7 +350,6 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area)
        struct ospf_lsa *lsa;
        struct router_lsa *rlsa;
        struct in_addr *best = NULL;
-       char buf[PREFIX_STRLEN];
 
        LSDB_LOOP (ROUTER_LSDB(area), rn, lsa) {
                /* sanity checks */
@@ -382,9 +381,8 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area)
 
        if (IS_DEBUG_OSPF_NSSA)
                zlog_debug(
-                       "ospf_abr_nssa_am_elected: best electable ABR is: %s",
-                       (best) ? inet_ntop(AF_INET, best, buf, sizeof(buf)) :
-                       "<none>");
+                       "ospf_abr_nssa_am_elected: best electable ABR is: %pI4",
+                       best);
 
        if (best == NULL)
                return 1;
index 8f9153d766ae64d49c6219d8e8b20f6f323a684c..848f3407503e5bf7862cb10ceb4565aedb1281a8 100644 (file)
@@ -454,16 +454,13 @@ int ospf_flood_through_interface(struct ospf_interface *oi,
        struct ospf_neighbor *onbr;
        struct route_node *rn;
        int retx_flag;
-       char buf[PREFIX_STRLEN];
 
        if (IS_DEBUG_OSPF_EVENT)
                zlog_debug(
-                       "%s: considering int %s (%s), INBR(%s), LSA[%s] AGE %u",
+                       "%s: considering int %s (%s), INBR(%pI4), LSA[%s] AGE %u",
                        __func__, IF_NAME(oi), ospf_get_name(oi->ospf),
-                       inbr ? inet_ntop(AF_INET, &inbr->router_id, buf,
-                                        sizeof(buf))
-                            : "NULL",
-                       dump_lsa_key(lsa), ntohs(lsa->data->ls_age));
+                       inbr ? &inbr->router_id : NULL, dump_lsa_key(lsa),
+                       ntohs(lsa->data->ls_age));
 
        if (!ospf_if_is_enable(oi))
                return 0;
index 4e4ebc9cdaee9608367f545358fafdf03ee7f026..2c83a7ed4ce5f2914a020958476a1d64796685c5 100644 (file)
@@ -199,7 +199,7 @@ static int if_getaddrs(void)
                ifp = if_lookup_by_name(ifap->ifa_name, VRF_DEFAULT);
                if (ifp == NULL) {
                        flog_err(EC_LIB_INTERFACE,
-                                "if_getaddrs(): Can't lookup interface %s\n",
+                                "if_getaddrs(): Can't lookup interface %s",
                                 ifap->ifa_name);
                        continue;
                }