diff options
Diffstat (limited to 'bgpd/bgp_packet.c')
-rw-r--r-- | bgpd/bgp_packet.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 0e02baa26..3c49b9692 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1091,7 +1091,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) /* Just in case we have a silly peer who sends AS4 capability set to 0 */ if (CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV) && !as4) { - zlog_ferr(BGP_ERR_PKT_OPEN, + flog_err(BGP_ERR_PKT_OPEN, "%s bad OPEN, got AS4 capability, but AS4 set to 0", peer->host); bgp_notify_send_with_data(peer, BGP_NOTIFY_OPEN_ERR, @@ -1106,7 +1106,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) * BGP_AS_TRANS, for some unknown reason. */ if (as4 == BGP_AS_TRANS) { - zlog_ferr( + flog_err( BGP_ERR_PKT_OPEN, "%s [AS4] NEW speaker using AS_TRANS for AS4, not allowed", peer->host); @@ -1136,7 +1136,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) if (CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV) && as4 != remote_as) { /* raise error, log this, close session */ - zlog_ferr( + flog_err( BGP_ERR_PKT_OPEN, "%s bad OPEN, got AS4 capability, but remote_as %u" " mismatch with 16bit 'myasn' %u in open", @@ -1304,7 +1304,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) /* Get sockname. */ if ((ret = bgp_getsockname(peer)) < 0) { - zlog_ferr(LIB_ERR_SOCKET, + flog_err(LIB_ERR_SOCKET, "%s: bgp_getsockname() failed for peer: %s", __FUNCTION__, peer->host); return BGP_Stop; @@ -1319,7 +1319,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) || peer->afc_nego[AFI_IP][SAFI_ENCAP]) { if (!peer->nexthop.v4.s_addr) { #if defined(HAVE_CUMULUS) - zlog_ferr( + flog_err( BGP_ERR_SND_FAIL, "%s: No local IPv4 addr resetting connection, fd %d", peer->host, peer->fd); @@ -1336,7 +1336,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size) || peer->afc_nego[AFI_IP6][SAFI_ENCAP]) { if (IN6_IS_ADDR_UNSPECIFIED(&peer->nexthop.v6_global)) { #if defined(HAVE_CUMULUS) - zlog_ferr( + flog_err( BGP_ERR_SND_FAIL, "%s: No local IPv6 addr resetting connection, fd %d", peer->host, peer->fd); @@ -1399,7 +1399,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) /* Status must be Established. */ if (peer->status != Established) { - zlog_ferr(BGP_ERR_INVALID_STATUS, + flog_err(BGP_ERR_INVALID_STATUS, "%s [FSM] Update packet received under status %s", peer->host, lookup_msg(bgp_status_msg, peer->status, NULL)); @@ -1423,7 +1423,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) Attribute Length + 23 exceeds the message Length), then the Error Subcode is set to Malformed Attribute List. */ if (stream_pnt(s) + 2 > end) { - zlog_ferr(BGP_ERR_UPDATE_RCV, + flog_err(BGP_ERR_UPDATE_RCV, "%s [Error] Update packet error" " (packet length is short for unfeasible length)", peer->host); @@ -1437,7 +1437,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) /* Unfeasible Route Length check. */ if (stream_pnt(s) + withdraw_len > end) { - zlog_ferr(BGP_ERR_UPDATE_RCV, + flog_err(BGP_ERR_UPDATE_RCV, "%s [Error] Update packet error" " (packet unfeasible length overflow %d)", peer->host, withdraw_len); @@ -1511,7 +1511,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) ret = bgp_dump_attr(&attr, peer->rcvd_attr_str, BUFSIZ); if (attr_parse_ret == BGP_ATTR_PARSE_WITHDRAW) - zlog_ferr( + flog_err( BGP_ERR_UPDATE_RCV, "%s rcvd UPDATE with errors in attr(s)!! Withdrawing route.", peer->host); @@ -1572,7 +1572,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size) } if (nlri_ret < 0) { - zlog_ferr(BGP_ERR_UPDATE_RCV, + flog_err(BGP_ERR_UPDATE_RCV, "%s [Error] Error parsing NLRI", peer->host); if (peer->status == Established) bgp_notify_send( @@ -1744,7 +1744,7 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size) /* If peer does not have the capability, send notification. */ if (!CHECK_FLAG(peer->cap, PEER_CAP_REFRESH_ADV)) { - zlog_ferr(BGP_ERR_NO_CAP, + flog_err(BGP_ERR_NO_CAP, "%s [Error] BGP route refresh is not enabled", peer->host); bgp_notify_send(peer, BGP_NOTIFY_HEADER_ERR, @@ -1754,7 +1754,7 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size) /* Status must be Established. */ if (peer->status != Established) { - zlog_ferr( + flog_err( BGP_ERR_INVALID_STATUS, "%s [Error] Route refresh packet received under status %s", peer->host, @@ -2135,7 +2135,7 @@ int bgp_capability_receive(struct peer *peer, bgp_size_t size) /* If peer does not have the capability, send notification. */ if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV)) { - zlog_ferr(BGP_ERR_NO_CAP, + flog_err(BGP_ERR_NO_CAP, "%s [Error] BGP dynamic capability is not enabled", peer->host); bgp_notify_send(peer, BGP_NOTIFY_HEADER_ERR, @@ -2145,7 +2145,7 @@ int bgp_capability_receive(struct peer *peer, bgp_size_t size) /* Status must be Established. */ if (peer->status != Established) { - zlog_ferr( + flog_err( BGP_ERR_NO_CAP, "%s [Error] Dynamic capability packet received under status %s", peer->host, @@ -2227,7 +2227,7 @@ int bgp_process_packet(struct thread *thread) memory_order_relaxed); mprc = bgp_open_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_PKT_OPEN, "%s: BGP OPEN receipt failed for peer: %s", __FUNCTION__, peer->host); @@ -2238,7 +2238,7 @@ int bgp_process_packet(struct thread *thread) peer->readtime = monotime(NULL); mprc = bgp_update_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_UPDATE_RCV, "%s: BGP UPDATE receipt failed for peer: %s", __FUNCTION__, peer->host); @@ -2248,7 +2248,7 @@ int bgp_process_packet(struct thread *thread) memory_order_relaxed); mprc = bgp_notify_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_NOTIFY_RCV, "%s: BGP NOTIFY receipt failed for peer: %s", __FUNCTION__, peer->host); @@ -2259,7 +2259,7 @@ int bgp_process_packet(struct thread *thread) memory_order_relaxed); mprc = bgp_keepalive_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_KEEP_RCV, "%s: BGP KEEPALIVE receipt failed for peer: %s", __FUNCTION__, peer->host); @@ -2270,7 +2270,7 @@ int bgp_process_packet(struct thread *thread) memory_order_relaxed); mprc = bgp_route_refresh_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_RFSH_RCV, "%s: BGP ROUTEREFRESH receipt failed for peer: %s", __FUNCTION__, peer->host); @@ -2280,7 +2280,7 @@ int bgp_process_packet(struct thread *thread) memory_order_relaxed); mprc = bgp_capability_receive(peer, size); if (mprc == BGP_Stop) - zlog_ferr( + flog_err( BGP_ERR_CAP_RCV, "%s: BGP CAPABILITY receipt failed for peer: %s", __FUNCTION__, peer->host); |