summaryrefslogtreecommitdiff
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 486ef3335d..f1d4a39dba 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -35,6 +35,7 @@
#include "checksum.h"
#include "md5.h"
#include "vrf.h"
+#include "ospf_errors.h"
#include "ospfd/ospfd.h"
#include "ospfd/ospf_network.h"
@@ -230,7 +231,8 @@ void ospf_fifo_free(struct ospf_fifo *fifo)
void ospf_packet_add(struct ospf_interface *oi, struct ospf_packet *op)
{
if (!oi->obuf) {
- zlog_err(
+ flog_err(
+ OSPF_ERR_PKT_PROCESS,
"ospf_packet_add(interface %s in state %d [%s], packet type %s, "
"destination %s) called with NULL obuf, ignoring "
"(please report this bug)!\n",
@@ -253,7 +255,8 @@ static void ospf_packet_add_top(struct ospf_interface *oi,
struct ospf_packet *op)
{
if (!oi->obuf) {
- zlog_err(
+ flog_err(
+ OSPF_ERR_PKT_PROCESS,
"ospf_packet_add(interface %s in state %d [%s], packet type %s, "
"destination %s) called with NULL obuf, ignoring "
"(please report this bug)!\n",
@@ -1915,17 +1918,18 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
char buf2[INET_ADDRSTRLEN];
char buf3[INET_ADDRSTRLEN];
- zlog_err(
- "Incoming Router-LSA from %s with "
- "Adv-ID[%s] != LS-ID[%s]",
- inet_ntop(AF_INET, &ospfh->router_id,
- buf1, INET_ADDRSTRLEN),
- inet_ntop(AF_INET, &lsa->data->id, buf2,
- INET_ADDRSTRLEN),
- inet_ntop(AF_INET,
- &lsa->data->adv_router, buf3,
- INET_ADDRSTRLEN));
- zlog_err(
+ flog_err(OSPF_ERR_ROUTER_LSA_MISMATCH,
+ "Incoming Router-LSA from %s with "
+ "Adv-ID[%s] != LS-ID[%s]",
+ inet_ntop(AF_INET, &ospfh->router_id,
+ buf1, INET_ADDRSTRLEN),
+ inet_ntop(AF_INET, &lsa->data->id,
+ buf2, INET_ADDRSTRLEN),
+ inet_ntop(AF_INET,
+ &lsa->data->adv_router,
+ buf3, INET_ADDRSTRLEN));
+ flog_err(
+ OSPF_ERR_DOMAIN_CORRUPT,
"OSPF domain compromised by attack or corruption. "
"Verify correct operation of -ALL- OSPF routers.");
DISCARD_LSA(lsa, 0);