]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: style for flog_warn conversions
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 24 Aug 2018 16:26:43 +0000 (16:26 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:56:41 +0000 (20:56 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
21 files changed:
bgpd/bgp_aspath.c
bgpd/bgp_attr.c
bgpd/bgp_evpn.c
bgpd/bgp_packet.c
bgpd/bgp_updgrp_packet.c
lib/agentx.c
lib/buffer.c
lib/plist.c
lib/sockunion.c
lib/vrf.c
lib/zclient.c
ospfd/ospf_apiserver.c
ospfd/ospf_asbr.c
ospfd/ospf_ext.c
ospfd/ospf_neighbor.c
ospfd/ospf_network.c
ospfd/ospf_nsm.c
ospfd/ospf_ri.c
ospfd/ospf_sr.c
ospfd/ospf_te.c
ospfd/ospfd.c

index 55e5b03b15079e63a236410164b48d6cccc449d9..b156cda86dfe4264f430658e9b844047021ff169 100644 (file)
@@ -38,7 +38,7 @@
 #include "bgpd/bgp_errors.h"
 
 /* Attr. Flags and Attr. Type Code. */
-#define AS_HEADER_SIZE        2
+#define AS_HEADER_SIZE 2
 
 /* Now FOUR octets are used for AS value. */
 #define AS_VALUE_SIZE         sizeof (as_t)
@@ -1639,8 +1639,9 @@ struct aspath *aspath_reconcile_as4(struct aspath *aspath,
 
        if (hops < 0) {
                if (BGP_DEBUG(as4, AS4))
-                       flog_warn(BGP_WARN_ASPATH_FEWER_HOPS,
-                                 "[AS4] Fewer hops in AS_PATH than NEW_AS_PATH");
+                       flog_warn(
+                               BGP_WARN_ASPATH_FEWER_HOPS,
+                               "[AS4] Fewer hops in AS_PATH than NEW_AS_PATH");
                /* Something's gone wrong. The RFC says we should now ignore
                 * AS4_PATH,
                 * which is daft behaviour - it contains vital loop-detection
index a993cc71c55ab042fd4ff5207a0fc0e551ab6aef..062a8a9b4281b7f259c083cc73a23b75aab9f5d9 100644 (file)
@@ -1760,9 +1760,10 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args,
        {
                uint8_t val;
                if ((val = stream_getc(s)))
-                       flog_warn(BGP_WARN_DEFUNCT_SNPA_LEN,
-                                 "%s sent non-zero value, %u, for defunct SNPA-length field",
-                                 peer->host, val);
+                       flog_warn(
+                               BGP_WARN_DEFUNCT_SNPA_LEN,
+                               "%s sent non-zero value, %u, for defunct SNPA-length field",
+                               peer->host, val);
        }
 
        /* must have nrli_len, what is left of the attribute */
@@ -2378,11 +2379,12 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                /* Check remaining length check.*/
                if (endp - BGP_INPUT_PNT(peer) < BGP_ATTR_MIN_LEN) {
                        /* XXX warning: long int format, int arg (arg 5) */
-                       flog_warn(BGP_WARN_ATTRIBUTE_TOO_SMALL,
-                                 "%s: error BGP attribute length %lu is smaller than min len",
-                                 peer->host,
-                                 (unsigned long)(endp
-                                                 - stream_pnt(BGP_INPUT(peer))));
+                       flog_warn(
+                               BGP_WARN_ATTRIBUTE_TOO_SMALL,
+                               "%s: error BGP attribute length %lu is smaller than min len",
+                               peer->host,
+                               (unsigned long)(endp
+                                               - stream_pnt(BGP_INPUT(peer))));
 
                        bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
                                        BGP_NOTIFY_UPDATE_ATTR_LENG_ERR);
@@ -2400,11 +2402,12 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                /* Check whether Extended-Length applies and is in bounds */
                if (CHECK_FLAG(flag, BGP_ATTR_FLAG_EXTLEN)
                    && ((endp - startp) < (BGP_ATTR_MIN_LEN + 1))) {
-                       flog_warn(BGP_WARN_EXT_ATTRIBUTE_TOO_SMALL,
-                                 "%s: Extended length set, but just %lu bytes of attr header",
-                                 peer->host,
-                                 (unsigned long)(endp
-                                                 - stream_pnt(BGP_INPUT(peer))));
+                       flog_warn(
+                               BGP_WARN_EXT_ATTRIBUTE_TOO_SMALL,
+                               "%s: Extended length set, but just %lu bytes of attr header",
+                               peer->host,
+                               (unsigned long)(endp
+                                               - stream_pnt(BGP_INPUT(peer))));
 
                        bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
                                        BGP_NOTIFY_UPDATE_ATTR_LENG_ERR);
@@ -2422,9 +2425,10 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                   List. */
 
                if (CHECK_BITMAP(seen, type)) {
-                       flog_warn(BGP_WARN_ATTRIBUTE_REPEATED,
-                                 "%s: error BGP attribute type %d appears twice in a message",
-                                 peer->host, type);
+                       flog_warn(
+                               BGP_WARN_ATTRIBUTE_REPEATED,
+                               "%s: error BGP attribute type %d appears twice in a message",
+                               peer->host, type);
 
                        bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
                                        BGP_NOTIFY_UPDATE_MAL_ATTR);
@@ -2440,10 +2444,11 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                attr_endp = BGP_INPUT_PNT(peer) + length;
 
                if (attr_endp > endp) {
-                       flog_warn(BGP_WARN_ATTRIBUTE_TOO_LARGE,
-                                 "%s: BGP type %d length %d is too large, attribute total length is %d.  attr_endp is %p.  endp is %p",
-                                 peer->host, type, length, size, attr_endp,
-                                 endp);
+                       flog_warn(
+                               BGP_WARN_ATTRIBUTE_TOO_LARGE,
+                               "%s: BGP type %d length %d is too large, attribute total length is %d.  attr_endp is %p.  endp is %p",
+                               peer->host, type, length, size, attr_endp,
+                               endp);
                        /*
                         * RFC 4271 6.3
                         * If any recognized attribute has an Attribute
@@ -2607,7 +2612,8 @@ bgp_attr_parse_ret_t bgp_attr_parse(struct peer *peer, struct attr *attr,
                }
                if (ret == BGP_ATTR_PARSE_WITHDRAW) {
 
-                       flog_warn(BGP_WARN_ATTRIBUTE_PARSE_WITHDRAW,
+                       flog_warn(
+                               BGP_WARN_ATTRIBUTE_PARSE_WITHDRAW,
                                "%s: Attribute %s, parse error - treating as withdrawal",
                                peer->host, lookup_msg(attr_str, type, NULL));
                        if (as4_path)
index 713179ab973a052502bfdc5250058118dddeaadd..3bd566e072e96306664e2c6a0bcce200bab24f06 100644 (file)
@@ -3683,10 +3683,11 @@ static int process_type3_route(struct peer *peer, afi_t afi, safi_t safi,
        if (attr &&
            (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL))) {
                if (attr->pmsi_tnl_type != PMSI_TNLTYPE_INGR_REPL) {
-                       flog_warn(BGP_WARN_EVPN_PMSI_PRESENT,
-                                 "%u:%s - Rx EVPN Type-3 NLRI with unsupported PTA %d",
-                                 peer->bgp->vrf_id, peer->host,
-                                 attr->pmsi_tnl_type);
+                       flog_warn(
+                               BGP_WARN_EVPN_PMSI_PRESENT,
+                               "%u:%s - Rx EVPN Type-3 NLRI with unsupported PTA %d",
+                               peer->bgp->vrf_id, peer->host,
+                               attr->pmsi_tnl_type);
                }
        }
 
@@ -5401,9 +5402,10 @@ int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni)
        vpn = bgp_evpn_lookup_vni(bgp, vni);
        if (!vpn) {
                if (bgp_debug_zebra(NULL))
-                       flog_warn(BGP_WARN_EVPN_VPN_VNI,
-                                 "%u: VNI hash entry for VNI %u not found at DEL",
-                                 bgp->vrf_id, vni);
+                       flog_warn(
+                               BGP_WARN_EVPN_VPN_VNI,
+                               "%u: VNI hash entry for VNI %u not found at DEL",
+                               bgp->vrf_id, vni);
                return 0;
        }
 
index c04116e9eeccfab01c9d968735058db74fb9e6a1..d8bab60414a6a21475a0b59d855fe34808f49cf2 100644 (file)
@@ -1457,9 +1457,10 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
 
        /* Attribute total length check. */
        if (stream_pnt(s) + 2 > end) {
-               flog_warn(BGP_WARN_UPDATE_PACKET_SHORT,
-                         "%s [Error] Packet Error (update packet is short for attribute length)",
-                         peer->host);
+               flog_warn(
+                       BGP_WARN_UPDATE_PACKET_SHORT,
+                       "%s [Error] Packet Error (update packet is short for attribute length)",
+                       peer->host);
                bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
                                BGP_NOTIFY_UPDATE_MAL_ATTR);
                return BGP_Stop;
@@ -1470,9 +1471,10 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
 
        /* Attribute length check. */
        if (stream_pnt(s) + attribute_len > end) {
-               flog_warn(BGP_WARN_UPDATE_PACKET_LONG,
-                         "%s [Error] Packet Error (update packet attribute length overflow %d)",
-                         peer->host, attribute_len);
+               flog_warn(
+                       BGP_WARN_UPDATE_PACKET_LONG,
+                       "%s [Error] Packet Error (update packet attribute length overflow %d)",
+                       peer->host, attribute_len);
                bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
                                BGP_NOTIFY_UPDATE_MAL_ATTR);
                return BGP_Stop;
@@ -2102,9 +2104,10 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
                                        return BGP_Stop;
                        }
                } else {
-                       flog_warn(BGP_WARN_UNRECOGNIZED_CAPABILITY,
-                                 "%s unrecognized capability code: %d - ignored",
-                                 peer->host, hdr->code);
+                       flog_warn(
+                               BGP_WARN_UNRECOGNIZED_CAPABILITY,
+                               "%s unrecognized capability code: %d - ignored",
+                               peer->host, hdr->code);
                }
        }
 
index cba3b07032b2711b74f1b61c54dce7dde98a2000..f3047369bc6ed7436a5924367bc63d22433788e9 100644 (file)
@@ -427,9 +427,10 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
                                break;
                        default:
                                /* TODO: handle IPv6 nexthops */
-                               flog_warn(BGP_WARN_INVALID_NEXTHOP_LENGTH,
-                                         "%s: %s: invalid MP nexthop length (AFI IP): %u",
-                                         __func__, peer->host, nhlen);
+                               flog_warn(
+                                       BGP_WARN_INVALID_NEXTHOP_LENGTH,
+                                       "%s: %s: invalid MP nexthop length (AFI IP): %u",
+                                       __func__, peer->host, nhlen);
                                stream_free(s);
                                return NULL;
                        }
@@ -532,9 +533,10 @@ struct stream *bpacket_reformat_for_peer(struct bpacket *pkt,
                                break;
                        default:
                                /* TODO: handle IPv4 nexthops */
-                               flog_warn(BGP_WARN_INVALID_NEXTHOP_LENGTH,
-                                         "%s: %s: invalid MP nexthop length (AFI IP6): %u",
-                                         __func__, peer->host, nhlen);
+                               flog_warn(
+                                       BGP_WARN_INVALID_NEXTHOP_LENGTH,
+                                       "%s: %s: invalid MP nexthop length (AFI IP6): %u",
+                                       __func__, peer->host, nhlen);
                                stream_free(s);
                                return NULL;
                        }
index e4d35854fa0423c7344721b0c9fc208cf5ea12c9..c319649e3f92d36854b38005a3a2130d02f46f71 100644 (file)
@@ -158,8 +158,8 @@ static int agentx_log_callback(int major, int minor, void *serverarg,
                          "snmp[err]: %s", msg ? msg : slm->msg);
                break;
        case LOG_WARNING:
-               flog_warn(LIB_WARN_SNMP,
-                         "snmp[warning]: %s", msg ? msg : slm->msg);
+               flog_warn(LIB_WARN_SNMP, "snmp[warning]: %s",
+                         msg ? msg : slm->msg);
                break;
        case LOG_NOTICE:
                zlog_notice("snmp[notice]: %s", msg ? msg : slm->msg);
index bed42f047f3cc415b824f57438e258997e4b1516..0bf75e4c38e9c9242125bda5bf336cd3f022a1e1 100644 (file)
@@ -378,9 +378,8 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
        }
 #else  /* IOV_MAX */
        if ((nbytes = writev(fd, iov, iov_index)) < 0)
-               flog_err(LIB_ERR_SOCKET,
-                        "%s: writev to fd %d failed: %s", __func__, fd,
-                        safe_strerror(errno));
+               flog_err(LIB_ERR_SOCKET, "%s: writev to fd %d failed: %s",
+                        __func__, fd, safe_strerror(errno));
 #endif /* IOV_MAX */
 
        /* Free printed buffer data. */
@@ -440,9 +439,8 @@ in one shot. */
                if (ERRNO_IO_RETRY(errno))
                        /* Calling code should try again later. */
                        return BUFFER_PENDING;
-               flog_err(LIB_ERR_SOCKET,
-                        "%s: write error on fd %d: %s", __func__, fd,
-                         safe_strerror(errno));
+               flog_err(LIB_ERR_SOCKET, "%s: write error on fd %d: %s",
+                        __func__, fd, safe_strerror(errno));
                return BUFFER_ERROR;
        }
 
@@ -496,9 +494,8 @@ buffer_status_t buffer_write(struct buffer *b, int fd, const void *p,
                if (ERRNO_IO_RETRY(errno))
                        nbytes = 0;
                else {
-                       flog_err(LIB_ERR_SOCKET,
-                                "%s: write error on fd %d: %s", __func__, fd,
-                                safe_strerror(errno));
+                       flog_err(LIB_ERR_SOCKET, "%s: write error on fd %d: %s",
+                                __func__, fd, safe_strerror(errno));
                        return BUFFER_ERROR;
                }
        }
index b374ca17800c390583ede9c4409f593ad9ffb99c..f8dd7df0be53b2102a9759b37b34cdc5e2c32a86 100644 (file)
@@ -933,8 +933,9 @@ static int vty_prefix_list_install(struct vty *vty, afi_t afi, const char *name,
                vty_out(vty,
                        "%% Prefix-list %s prefix changed from %s to %s to match length\n",
                        name, buf, buf_tmp);
-               zlog_info("Prefix-list %s prefix changed from %s to %s to match length",
-                         name, buf, buf_tmp);
+               zlog_info(
+                       "Prefix-list %s prefix changed from %s to %s to match length",
+                       name, buf, buf_tmp);
                p = p_tmp;
        }
 
index e1bbbaa0c0777f3d32c49f5d7c11b82f3c61be7f..f4e806e928009add2f0fcb347164c4689dad28b1 100644 (file)
@@ -140,8 +140,7 @@ int sockunion_socket(const union sockunion *su)
        sock = socket(su->sa.sa_family, SOCK_STREAM, 0);
        if (sock < 0) {
                char buf[SU_ADDRSTRLEN];
-               flog_err(LIB_ERR_SOCKET,
-                        "Can't make socket for %s : %s",
+               flog_err(LIB_ERR_SOCKET, "Can't make socket for %s : %s",
                         sockunion_log(su, buf, SU_ADDRSTRLEN),
                         safe_strerror(errno));
                return -1;
@@ -275,8 +274,7 @@ int sockunion_bind(int sock, union sockunion *su, unsigned short port,
        ret = bind(sock, (struct sockaddr *)su, size);
        if (ret < 0) {
                char buf[SU_ADDRSTRLEN];
-               flog_err(LIB_ERR_SOCKET,
-                        "can't bind socket for %s : %s",
+               flog_err(LIB_ERR_SOCKET, "can't bind socket for %s : %s",
                         sockunion_log(su, buf, SU_ADDRSTRLEN),
                         safe_strerror(errno));
        }
@@ -332,7 +330,7 @@ int sockopt_ttl(int family, int sock, int ttl)
                if (ret < 0) {
                        flog_err(LIB_ERR_SOCKET,
                                 "can't set sockopt IP_TTL %d to socket %d",
-                                 ttl, sock);
+                                ttl, sock);
                        return -1;
                }
                return 0;
@@ -342,9 +340,10 @@ int sockopt_ttl(int family, int sock, int ttl)
                ret = setsockopt(sock, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
                                 (void *)&ttl, sizeof(int));
                if (ret < 0) {
-                       flog_err(LIB_ERR_SOCKET,
-                                "can't set sockopt IPV6_UNICAST_HOPS %d to socket %d",
-                                ttl, sock);
+                       flog_err(
+                               LIB_ERR_SOCKET,
+                               "can't set sockopt IPV6_UNICAST_HOPS %d to socket %d",
+                               ttl, sock);
                        return -1;
                }
                return 0;
@@ -389,9 +388,10 @@ int sockopt_minttl(int family, int sock, int minttl)
                int ret = setsockopt(sock, IPPROTO_IP, IP_MINTTL, &minttl,
                                     sizeof(minttl));
                if (ret < 0)
-                       flog_err(LIB_ERR_SOCKET,
-                                "can't set sockopt IP_MINTTL to %d on socket %d: %s",
-                                minttl, sock, safe_strerror(errno));
+                       flog_err(
+                               LIB_ERR_SOCKET,
+                               "can't set sockopt IP_MINTTL to %d on socket %d: %s",
+                               minttl, sock, safe_strerror(errno));
                return ret;
        }
 #endif /* IP_MINTTL */
@@ -400,9 +400,10 @@ int sockopt_minttl(int family, int sock, int minttl)
                int ret = setsockopt(sock, IPPROTO_IPV6, IPV6_MINHOPCOUNT,
                                     &minttl, sizeof(minttl));
                if (ret < 0)
-                       flog_err(LIB_ERR_SOCKET,
-                                "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s",
-                                minttl, sock, safe_strerror(errno));
+                       flog_err(
+                               LIB_ERR_SOCKET,
+                               "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s",
+                               minttl, sock, safe_strerror(errno));
                return ret;
        }
 #endif
index 18314b4f3207092940da68d5f55baa21348bb174..1e538a8c53a784580eb55dd643ecfd71528457c6 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -667,8 +667,8 @@ int vrf_netns_handler_create(struct vty *vty, struct vrf *vrf, char *pathname,
                                        vrf->vrf_id, ns->name);
                        else
                                zlog_info(
-                                         "VRF %u already configured with NETNS %s",
-                                         vrf->vrf_id, ns->name);
+                                       "VRF %u already configured with NETNS %s",
+                                       vrf->vrf_id, ns->name);
                        return CMD_WARNING_CONFIG_FAILED;
                }
        }
index cb8172713f08413a8a73a8d2b83fc73a496a45fc..340eb0db339244eae81cf74990133a698590c3f2 100644 (file)
@@ -249,9 +249,10 @@ static int zclient_flush_data(struct thread *thread)
                return -1;
        switch (buffer_flush_available(zclient->wb, zclient->sock)) {
        case BUFFER_ERROR:
-               flog_err(LIB_ERR_ZAPI_SOCKET,
-                        "%s: buffer_flush_available failed on zclient fd %d, closing",
-                        __func__, zclient->sock);
+               flog_err(
+                       LIB_ERR_ZAPI_SOCKET,
+                       "%s: buffer_flush_available failed on zclient fd %d, closing",
+                       __func__, zclient->sock);
                return zclient_failed(zclient);
                break;
        case BUFFER_PENDING:
@@ -576,9 +577,8 @@ int zclient_start(struct zclient *zclient)
        }
 
        if (set_nonblocking(zclient->sock) < 0)
-               flog_err(LIB_ERR_ZAPI_SOCKET,
-                        "%s: set_nonblocking(%d) failed", __func__,
-                        zclient->sock);
+               flog_err(LIB_ERR_ZAPI_SOCKET, "%s: set_nonblocking(%d) failed",
+                        __func__, zclient->sock);
 
        /* Clear fail count. */
        zclient->fail = 0;
@@ -773,9 +773,10 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
                        char buf[PREFIX2STR_BUFFER];
 
                        prefix2str(&api->prefix, buf, sizeof(buf));
-                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                "%s: prefix %s: can't encode %u nexthops (maximum is %u)",
-                                __func__, buf, api->nexthop_num, MULTIPATH_NUM);
+                       flog_err(
+                               LIB_ERR_ZAPI_ENCODE,
+                               "%s: prefix %s: can't encode %u nexthops (maximum is %u)",
+                               __func__, buf, api->nexthop_num, MULTIPATH_NUM);
                        return -1;
                }
 
@@ -884,17 +885,19 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
        switch (api->prefix.family) {
        case AF_INET:
                if (api->prefix.prefixlen > IPV4_MAX_PREFIXLEN) {
-                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                "%s: V4 prefixlen is %d which should not be more than 32",
-                                __PRETTY_FUNCTION__, api->prefix.prefixlen);
+                       flog_err(
+                               LIB_ERR_ZAPI_ENCODE,
+                               "%s: V4 prefixlen is %d which should not be more than 32",
+                               __PRETTY_FUNCTION__, api->prefix.prefixlen);
                        return -1;
                }
                break;
        case AF_INET6:
                if (api->prefix.prefixlen > IPV6_MAX_PREFIXLEN) {
-                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                "%s: v6 prefixlen is %d which should not be more than 128",
-                                __PRETTY_FUNCTION__, api->prefix.prefixlen);
+                       flog_err(
+                               LIB_ERR_ZAPI_ENCODE,
+                               "%s: v6 prefixlen is %d which should not be more than 128",
+                               __PRETTY_FUNCTION__, api->prefix.prefixlen);
                        return -1;
                }
                break;
@@ -910,9 +913,10 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
                api->src_prefix.family = AF_INET6;
                STREAM_GETC(s, api->src_prefix.prefixlen);
                if (api->src_prefix.prefixlen > IPV6_MAX_PREFIXLEN) {
-                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                "%s: SRC Prefix prefixlen received: %d is too large",
-                                __PRETTY_FUNCTION__, api->src_prefix.prefixlen);
+                       flog_err(
+                               LIB_ERR_ZAPI_ENCODE,
+                               "%s: SRC Prefix prefixlen received: %d is too large",
+                               __PRETTY_FUNCTION__, api->src_prefix.prefixlen);
                        return -1;
                }
                STREAM_GET(&api->src_prefix.prefix, s,
@@ -920,9 +924,10 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
 
                if (api->prefix.family != AF_INET6
                    || api->src_prefix.prefixlen == 0) {
-                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                "%s: SRC prefix specified in some manner that makes no sense",
-                                __PRETTY_FUNCTION__);
+                       flog_err(
+                               LIB_ERR_ZAPI_ENCODE,
+                               "%s: SRC prefix specified in some manner that makes no sense",
+                               __PRETTY_FUNCTION__);
                        return -1;
                }
        }
@@ -972,9 +977,10 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
                                STREAM_GETC(s, api_nh->label_num);
 
                                if (api_nh->label_num > MPLS_MAX_LABELS) {
-                                       flog_err(LIB_ERR_ZAPI_ENCODE,
-                                                "%s: invalid number of MPLS labels (%u)",
-                                                __func__, api_nh->label_num);
+                                       flog_err(
+                                               LIB_ERR_ZAPI_ENCODE,
+                                               "%s: invalid number of MPLS labels (%u)",
+                                               __func__, api_nh->label_num);
                                        return -1;
                                }
 
@@ -1666,11 +1672,12 @@ struct connected *zebra_interface_address_read(int type, struct stream *s,
                                /* carp interfaces on OpenBSD with 0.0.0.0/0 as
                                 * "peer" */
                                char buf[PREFIX_STRLEN];
-                               flog_err(LIB_ERR_ZAPI_ENCODE,
-                                        "warning: interface %s address %s with peer flag set, but no peer address!",
-                                        ifp->name,
-                                        prefix2str(ifc->address, buf,
-                                                   sizeof buf));
+                               flog_err(
+                                       LIB_ERR_ZAPI_ENCODE,
+                                       "warning: interface %s address %s with peer flag set, but no peer address!",
+                                       ifp->name,
+                                       prefix2str(ifc->address, buf,
+                                                  sizeof buf));
                                UNSET_FLAG(ifc->flags, ZEBRA_IFA_PEER);
                        }
                }
@@ -1723,8 +1730,8 @@ zebra_interface_nbr_address_read(int type, struct stream *s, vrf_id_t vrf_id)
                flog_err(LIB_ERR_ZAPI_ENCODE,
                         "INTERFACE_NBR_%s: Cannot find IF %u in VRF %d",
                         (type == ZEBRA_INTERFACE_NBR_ADDRESS_ADD) ? "ADD"
-                        : "DELETE",
-                         ifindex, vrf_id);
+                                                                  : "DELETE",
+                        ifindex, vrf_id);
                return NULL;
        }
 
@@ -2407,10 +2414,11 @@ static int zclient_read(struct thread *thread)
        /* Length check. */
        if (length > STREAM_SIZE(zclient->ibuf)) {
                struct stream *ns;
-               flog_err(LIB_ERR_ZAPI_ENCODE,
-                        "%s: message size %u exceeds buffer size %lu, expanding...",
-                        __func__, length,
-                        (unsigned long)STREAM_SIZE(zclient->ibuf));
+               flog_err(
+                       LIB_ERR_ZAPI_ENCODE,
+                       "%s: message size %u exceeds buffer size %lu, expanding...",
+                       __func__, length,
+                       (unsigned long)STREAM_SIZE(zclient->ibuf));
                ns = stream_new(length);
                stream_copy(ns, zclient->ibuf);
                stream_free(zclient->ibuf);
index 4ae57793dc089f7fc8c683ab67d65842f5ca8988..d4a8a266cbe0e99238043657dd69c6b8cb9aa604 100644 (file)
@@ -153,8 +153,9 @@ int ospf_apiserver_init(void)
                NULL,             /* ospf_apiserver_lsa_refresher */
                ospf_apiserver_lsa_update, ospf_apiserver_lsa_delete);
        if (rc != 0) {
-               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
-                         "ospf_apiserver_init: Failed to register opaque type [0/0]");
+               flog_warn(
+                       OSPF_WARN_OPAQUE_REGISTRATION,
+                       "ospf_apiserver_init: Failed to register opaque type [0/0]");
        }
 
        rc = 0;
index da5f485ef7ab1ff2ef774eb8b17614bb27d42709..ba2e04bf766b23b4f8daa2ad0e0b520fd6e3f9bd 100644 (file)
@@ -136,11 +136,11 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
                        inet_ntop(AF_INET, (void *)&nexthop.s_addr, inetbuf,
                                  INET6_BUFSIZ);
                        if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
-                           zlog_debug(
-                                      "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
-                                      ospf_redist_string(type), instance,
-                                      ospf->vrf_id, inet_ntoa(p.prefix), p.prefixlen,
-                                      inetbuf);
+                               zlog_debug(
+                                       "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
+                                       ospf_redist_string(type), instance,
+                                       ospf->vrf_id, inet_ntoa(p.prefix),
+                                       p.prefixlen, inetbuf);
                        XFREE(MTYPE_OSPF_EXTERNAL_INFO, rn->info);
                        rn->info = NULL;
                }
index 018ca5c0faff1cbec9ea542bd5ddf81e5f6376ab..1aab61168047447635395935230fd30252a99f62 100644 (file)
@@ -760,8 +760,8 @@ static int ospf_ext_link_lsa_update(struct ospf_lsa *lsa)
 {
        /* Sanity Check */
        if (lsa == NULL) {
-               flog_warn(OSPF_WARN_LSA_NULL,
-                         "EXT (%s): Abort! LSA is NULL", __func__);
+               flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+                         __func__);
                return -1;
        }
 
@@ -794,8 +794,8 @@ static int ospf_ext_pref_lsa_update(struct ospf_lsa *lsa)
 
        /* Sanity Check */
        if (lsa == NULL) {
-               flog_warn(OSPF_WARN_LSA_NULL,
-                         "EXT (%s): Abort! LSA is NULL", __func__);
+               flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+                         __func__);
                return -1;
        }
 
@@ -1190,8 +1190,9 @@ static int ospf_ext_pref_lsa_originate(void *arg)
                if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
                        if (CHECK_FLAG(exti->flags,
                                       EXT_LPFLG_LSA_FORCED_REFRESH)) {
-                               flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
-                                         "EXT (%s): Refresh instead of Originate",
+                               flog_warn(
+                                       OSPF_WARN_EXT_LSA_UNEXPECTED,
+                                       "EXT (%s): Refresh instead of Originate",
                                        __func__);
                                UNSET_FLAG(exti->flags,
                                           EXT_LPFLG_LSA_FORCED_REFRESH);
@@ -1247,9 +1248,10 @@ static int ospf_ext_link_lsa_originate(void *arg)
                if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
                        if (CHECK_FLAG(exti->flags,
                                       EXT_LPFLG_LSA_FORCED_REFRESH)) {
-                               flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
-                                         "EXT (%s): Refresh instead of Originate",
-                                         __func__);
+                               flog_warn(
+                                       OSPF_WARN_EXT_LSA_UNEXPECTED,
+                                       "EXT (%s): Refresh instead of Originate",
+                                       __func__);
                                UNSET_FLAG(exti->flags,
                                           EXT_LPFLG_LSA_FORCED_REFRESH);
                                ospf_ext_link_lsa_schedule(exti,
@@ -1467,9 +1469,10 @@ static void ospf_ext_pref_lsa_schedule(struct ext_itf *exti,
 
        /* Set LSA header information */
        if (exti->area == NULL) {
-               flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
-                         "EXT (%s): Flooding is Area scope but area is not yet set",
-                         __func__);
+               flog_warn(
+                       OSPF_WARN_EXT_LSA_UNEXPECTED,
+                       "EXT (%s): Flooding is Area scope but area is not yet set",
+                       __func__);
                if (OspfEXT.area == NULL) {
                        top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
                        OspfEXT.area = ospf_area_lookup_by_area_id(
@@ -1527,9 +1530,10 @@ static void ospf_ext_link_lsa_schedule(struct ext_itf *exti,
 
        /* Set LSA header information */
        if (exti->area == NULL) {
-               flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
-                         "EXT (%s): Flooding is Area scope but area is not yet set",
-                         __func__);
+               flog_warn(
+                       OSPF_WARN_EXT_LSA_UNEXPECTED,
+                       "EXT (%s): Flooding is Area scope but area is not yet set",
+                       __func__);
                if (OspfEXT.area == NULL) {
                        top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
                        OspfEXT.area = ospf_area_lookup_by_area_id(
index a0fe1c53ded415f67c791e544cdec927d13bce5d..a58bd93b6e8fbc0f5e167139ab8edf94f99b82c7 100644 (file)
@@ -271,8 +271,8 @@ void ospf_nbr_add_self(struct ospf_interface *oi, struct in_addr router_id)
                /* There is already pseudo neighbor. */
                if (IS_DEBUG_OSPF_EVENT)
                        zlog_debug(
-                                  "router_id %s already present in neighbor table. node refcount %u",
-                                  inet_ntoa(router_id), rn->lock);
+                               "router_id %s already present in neighbor table. node refcount %u",
+                               inet_ntoa(router_id), rn->lock);
                route_unlock_node(rn);
        } else
                rn->info = oi->nbr_self;
index d893a0210324ffc5b35846b027ec9a8626a06f1d..ed11f453508c619837af08a241c12d77adaeca13 100644 (file)
@@ -51,12 +51,13 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
                                        p->u.prefix4, htonl(OSPF_ALLSPFROUTERS),
                                        ifindex);
        if (ret < 0)
-               flog_err(LIB_ERR_SOCKET,
-                        "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
-                        "ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
-                        "on # of multicast group memberships has been exceeded?",
-                        top->fd, inet_ntoa(p->u.prefix4), ifindex,
-                        safe_strerror(errno));
+               flog_err(
+                       LIB_ERR_SOCKET,
+                       "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
+                       "ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
+                       "on # of multicast group memberships has been exceeded?",
+                       top->fd, inet_ntoa(p->u.prefix4), ifindex,
+                       safe_strerror(errno));
        else {
                if (IS_DEBUG_OSPF_EVENT)
                        zlog_debug(
@@ -101,12 +102,13 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p,
                                        p->u.prefix4, htonl(OSPF_ALLDROUTERS),
                                        ifindex);
        if (ret < 0)
-               flog_err(LIB_ERR_SOCKET,
-                        "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
-                        "ifindex %u, AllDRouters): %s; perhaps a kernel limit "
-                        "on # of multicast group memberships has been exceeded?",
-                        top->fd, inet_ntoa(p->u.prefix4), ifindex,
-                        safe_strerror(errno));
+               flog_err(
+                       LIB_ERR_SOCKET,
+                       "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
+                       "ifindex %u, AllDRouters): %s; perhaps a kernel limit "
+                       "on # of multicast group memberships has been exceeded?",
+                       top->fd, inet_ntoa(p->u.prefix4), ifindex,
+                       safe_strerror(errno));
        else
                zlog_debug(
                        "interface %s [%u] join AllDRouters Multicast group.",
index 83183071c7cecc1e9e80593a7ded8bd7c16f9d73..985e2efc98465886d8f395d985196b6a2600cf25 100644 (file)
@@ -796,15 +796,16 @@ int ospf_nsm_event(struct thread *thread)
                         * not
                         * try set next_state.
                         */
-                       flog_err(OSPF_ERR_FSM_INVALID_STATE,
-                                "NSM[%s:%s]: %s (%s): "
-                                "Warning: action tried to change next_state to %s",
-                                IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
-                                lookup_msg(ospf_nsm_state_msg, nbr->state,
-                                           NULL),
-                                ospf_nsm_event_str[event],
-                                lookup_msg(ospf_nsm_state_msg, func_state,
-                                           NULL));
+                       flog_err(
+                               OSPF_ERR_FSM_INVALID_STATE,
+                               "NSM[%s:%s]: %s (%s): "
+                               "Warning: action tried to change next_state to %s",
+                               IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
+                               lookup_msg(ospf_nsm_state_msg, nbr->state,
+                                          NULL),
+                               ospf_nsm_event_str[event],
+                               lookup_msg(ospf_nsm_state_msg, func_state,
+                                          NULL));
                }
        }
 
index 37d18767edee46d2c8c3097077823bc2dc7304f0..974822ba82656747aa698a978e785c7d7fa6891e 100644 (file)
@@ -186,8 +186,9 @@ static int ospf_router_info_register(uint8_t scope)
                NULL); /* del_lsa_hook */
 
        if (rc != 0) {
-               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
-                         "ospf_router_info_init: Failed to register functions");
+               flog_warn(
+                       OSPF_WARN_OPAQUE_REGISTRATION,
+                       "ospf_router_info_init: Failed to register functions");
                return rc;
        }
 
@@ -201,7 +202,8 @@ static int ospf_router_info_unregister()
 
        if ((OspfRI.scope != OSPF_OPAQUE_AS_LSA)
            && (OspfRI.scope != OSPF_OPAQUE_AREA_LSA)) {
-               assert("Unable to unregister Router Info functions: Wrong scope!" == NULL);
+               assert("Unable to unregister Router Info functions: Wrong scope!"
+                      == NULL);
                return -1;
        }
 
index 5ee56838aa4a327e559c322e2c73aa8c1aa6980b..2f8ff99097ec4724c2b4c6c04d4bfc7a9e462291 100644 (file)
@@ -818,8 +818,8 @@ static struct sr_prefix *get_ext_prefix_sid(struct tlv_header *tlvh)
                        psid = (struct ext_subtlv_prefix_sid *)sub_tlvh;
                        if (psid->algorithm != SR_ALGORITHM_SPF) {
                                flog_err(OSPF_ERR_INVALID_ALGORITHM,
-                                         "SR (%s): Unsupported Algorithm",
-                                         __func__);
+                                        "SR (%s): Unsupported Algorithm",
+                                        __func__);
                                XFREE(MTYPE_OSPF_SR_PARAMS, srp);
                                return NULL;
                        }
index 12325f4fba6c0aef88595c1fbd60cfcab396421d..f3be77195a12a264c361ea7289e634219838bb6c 100644 (file)
@@ -103,8 +103,9 @@ int ospf_mpls_te_init(void)
                ospf_mpls_te_lsa_refresh, NULL, /* ospf_mpls_te_new_lsa_hook */
                NULL /* ospf_mpls_te_del_lsa_hook */);
        if (rc != 0) {
-               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
-                         "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
+               flog_warn(
+                       OSPF_WARN_OPAQUE_REGISTRATION,
+                       "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
                return rc;
        }
 
@@ -140,8 +141,9 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
                                          ospf_mpls_te_lsa_refresh, NULL, NULL);
 
        if (rc != 0) {
-               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
-                         "ospf_router_info_init: Failed to register Inter-AS functions");
+               flog_warn(
+                       OSPF_WARN_OPAQUE_REGISTRATION,
+                       "ospf_router_info_init: Failed to register Inter-AS functions");
                return rc;
        }
 
@@ -817,8 +819,9 @@ static int is_mandated_params_set(struct mpls_te_link *lp)
        int rc = 0;
 
        if (ntohs(OspfMplsTE.router_addr.header.type) == 0) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "MPLS-TE(is_mandated_params_set) Missing Router Address");
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "MPLS-TE(is_mandated_params_set) Missing Router Address");
                return rc;
        }
 
@@ -921,9 +924,10 @@ void ospf_mpls_te_update_if(struct interface *ifp)
 
        /* Get Link context from interface */
        if ((lp = lookup_linkparams_by_ifp(ifp)) == NULL) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "OSPF MPLS-TE Update: Did not find Link Parameters context for interface %s",
-                         ifp->name);
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "OSPF MPLS-TE Update: Did not find Link Parameters context for interface %s",
+                       ifp->name);
                return;
        }
 
@@ -965,16 +969,18 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
        struct mpls_te_link *lp;
 
        if ((lp = lookup_linkparams_by_ifp(oi->ifp)) == NULL) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "ospf_mpls_te_ism_change: Cannot get linkparams from OI(%s)?",
-                         IF_NAME(oi));
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "ospf_mpls_te_ism_change: Cannot get linkparams from OI(%s)?",
+                       IF_NAME(oi));
                return;
        }
 
        if (oi->area == NULL || oi->area->ospf == NULL) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "ospf_mpls_te_ism_change: Cannot refer to OSPF from OI(%s)?",
-                         IF_NAME(oi));
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "ospf_mpls_te_ism_change: Cannot refer to OSPF from OI(%s)?",
+                       IF_NAME(oi));
                return;
        }
 #ifdef notyet
@@ -982,10 +988,11 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
             && !IPV4_ADDR_SAME(&lp->area->area_id, &oi->area->area_id))
            || (lp->area != NULL && oi->area == NULL)) {
                /* How should we consider this case? */
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "MPLS-TE: Area for OI(%s) has changed to [%s], flush previous LSAs",
-                         IF_NAME(oi),
-                         oi->area ? inet_ntoa(oi->area->area_id) : "N/A");
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "MPLS-TE: Area for OI(%s) has changed to [%s], flush previous LSAs",
+                       IF_NAME(oi),
+                       oi->area ? inet_ntoa(oi->area->area_id) : "N/A");
                ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
        }
 #endif
@@ -1216,8 +1223,9 @@ static int ospf_mpls_te_lsa_originate1(struct ospf_area *area,
        /* Create new Opaque-LSA/MPLS-TE instance. */
        new = ospf_mpls_te_lsa_new(area->ospf, area, lp);
        if (new == NULL) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "ospf_mpls_te_lsa_originate1: ospf_mpls_te_lsa_new() ?");
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "ospf_mpls_te_lsa_originate1: ospf_mpls_te_lsa_new() ?");
                return rc;
        }
 
@@ -1317,8 +1325,9 @@ static int ospf_mpls_te_lsa_originate2(struct ospf *top,
        /* Create new Opaque-LSA/Inter-AS instance. */
        new = ospf_mpls_te_lsa_new(top, NULL, lp);
        if (new == NULL) {
-               flog_warn(OSPF_WARN_LSA_UNEXPECTED,
-                         "ospf_mpls_te_lsa_originate2: ospf_router_info_lsa_new() ?");
+               flog_warn(
+                       OSPF_WARN_LSA_UNEXPECTED,
+                       "ospf_mpls_te_lsa_originate2: ospf_router_info_lsa_new() ?");
                return rc;
        }
        new->vrf_id = top->vrf_id;
@@ -1380,9 +1389,10 @@ static int ospf_mpls_te_lsa_originate_as(void *arg)
                }
 
                if (!is_mandated_params_set(lp)) {
-                       flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                                 "ospf_mpls_te_lsa_originate_as: Link(%s) lacks some mandated MPLS-TE parameters.",
-                                 lp->ifp ? lp->ifp->name : "?");
+                       flog_warn(
+                               OSPF_WARN_TE_UNEXPECTED,
+                               "ospf_mpls_te_lsa_originate_as: Link(%s) lacks some mandated MPLS-TE parameters.",
+                               lp->ifp ? lp->ifp->name : "?");
                        continue;
                }
 
@@ -1437,8 +1447,9 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
 
        /* Check if lp was not disable in the interval */
        if (!CHECK_FLAG(lp->flags, LPFLG_LSA_ACTIVE)) {
-               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                         "ospf_mpls_te_lsa_refresh: lp was disabled: Flush it!");
+               flog_warn(
+                       OSPF_WARN_TE_UNEXPECTED,
+                       "ospf_mpls_te_lsa_refresh: lp was disabled: Flush it!");
                lsa->data->ls_age =
                        htons(OSPF_LSA_MAXAGE); /* Flush it anyway. */
        }
@@ -1522,8 +1533,9 @@ void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, enum lsa_opcode opcode)
                                        top, OspfMplsTE.interas_areaid);
                        /* Unable to set the area context. Abort! */
                        if (lp->area == NULL) {
-                               flog_warn(OSPF_WARN_TE_UNEXPECTED,
-                                         "MPLS-TE(ospf_mpls_te_lsa_schedule) Area context is null. Abort !");
+                               flog_warn(
+                                       OSPF_WARN_TE_UNEXPECTED,
+                                       "MPLS-TE(ospf_mpls_te_lsa_schedule) Area context is null. Abort !");
                                return;
                        }
                        tmp = SET_OPAQUE_LSID(OPAQUE_TYPE_INTER_AS_LSA,
index d7406e4e19689fae69a97fb692ace137046901b4..a8535fa9c3a7c70b2141d12efedc58724f11e3a0 100644 (file)
@@ -324,9 +324,10 @@ static struct ospf *ospf_new(unsigned short instance, const char *name)
        new->fd = -1;
        if ((ospf_sock_init(new)) < 0) {
                if (new->vrf_id != VRF_UNKNOWN)
-                       flog_err(LIB_ERR_SOCKET,
-                                "%s: ospf_sock_init is unable to open a socket",
-                                __func__);
+                       flog_err(
+                               LIB_ERR_SOCKET,
+                               "%s: ospf_sock_init is unable to open a socket",
+                               __func__);
                return new;
        }
        thread_add_read(master, ospf_read, new, new->fd, &new->t_read);