diff options
Diffstat (limited to 'ripd')
| -rw-r--r-- | ripd/rip_errors.c | 13 | ||||
| -rw-r--r-- | ripd/rip_errors.h | 2 | ||||
| -rw-r--r-- | ripd/rip_interface.c | 2 | ||||
| -rw-r--r-- | ripd/ripd.c | 9 |
4 files changed, 12 insertions, 14 deletions
diff --git a/ripd/rip_errors.c b/ripd/rip_errors.c index 363b1b7fb5..b6fc43ee7c 100644 --- a/ripd/rip_errors.c +++ b/ripd/rip_errors.c @@ -24,16 +24,13 @@ #include "rip_errors.h" static struct log_ref ferr_rip_err[] = { - { - .code = RIP_ERR_PACKET, - .title = "RIP Packet Error", - .description = "RIP has detected a packet encode/decode issue", - .suggestion = "Gather log files from both sides and open a Issue" - }, + {.code = EC_RIP_PACKET, + .title = "RIP Packet Error", + .description = "RIP has detected a packet encode/decode issue", + .suggestion = "Gather log files from both sides and open a Issue"}, { .code = END_FERR, - } -}; + }}; void rip_error_init(void) { diff --git a/ripd/rip_errors.h b/ripd/rip_errors.h index 6b5f5c0169..feadf430ef 100644 --- a/ripd/rip_errors.h +++ b/ripd/rip_errors.h @@ -24,7 +24,7 @@ #include "lib/ferr.h" enum rip_log_refs { - RIP_ERR_PACKET = RIP_FERR_START, + EC_RIP_PACKET = RIP_FERR_START, RIP_ERR_CONFIG, }; diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 5b50c031a6..bbac1a0a00 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -865,7 +865,7 @@ static int rip_interface_wakeup(struct thread *t) /* Join to multicast group. */ if (rip_multicast_join(ifp, rip->sock) < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "multicast join failed, interface %s not running", ifp->name); return 0; diff --git a/ripd/ripd.c b/ripd/ripd.c index 560e649a89..94c3d4bc9c 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1056,9 +1056,10 @@ static void rip_auth_md5_set(struct stream *s, struct rip_interface *ri, /* Check packet length. */ if (len < (RIP_HEADER_SIZE + RIP_RTE_SIZE)) { - flog_err(RIP_ERR_PACKET, - "rip_auth_md5_set(): packet length %ld is less than minimum length.", - len); + flog_err( + EC_RIP_PACKET, + "rip_auth_md5_set(): packet length %ld is less than minimum length.", + len); return; } @@ -1339,7 +1340,7 @@ static int rip_create_socket(void) /* Make datagram socket. */ sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (sock < 0) { - flog_err_sys(LIB_ERR_SOCKET, "Cannot create UDP socket: %s", + flog_err_sys(EC_LIB_SOCKET, "Cannot create UDP socket: %s", safe_strerror(errno)); exit(1); } |
