]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_message.c
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / ospf6d / ospf6_message.c
index c608a0110243db8932528d49311e2a9e47c24c87..cd688bbf89b1f87c8c330b0b99c18343c18e6b18 100644 (file)
@@ -26,6 +26,7 @@
 #include "command.h"
 #include "thread.h"
 #include "linklist.h"
+#include "lib_errors.h"
 
 #include "ospf6_proto.h"
 #include "ospf6_lsa.h"
@@ -1503,14 +1504,6 @@ int ospf6_iobuf_size(unsigned int size)
 
        recvnew = XMALLOC(MTYPE_OSPF6_MESSAGE, size);
        sendnew = XMALLOC(MTYPE_OSPF6_MESSAGE, size);
-       if (recvnew == NULL || sendnew == NULL) {
-               if (recvnew)
-                       XFREE(MTYPE_OSPF6_MESSAGE, recvnew);
-               if (sendnew)
-                       XFREE(MTYPE_OSPF6_MESSAGE, sendnew);
-               zlog_debug("Could not allocate I/O buffer of size %d.", size);
-               return iobuflen;
-       }
 
        if (recvbuf)
                XFREE(MTYPE_OSPF6_MESSAGE, recvbuf);
@@ -1566,7 +1559,7 @@ int ospf6_receive(struct thread *thread)
        /* receive message */
        len = ospf6_recvmsg(&src, &dst, &ifindex, iovector);
        if (len > iobuflen) {
-               zlog_err("Excess message read");
+               flog_err(EC_LIB_DEVELOPMENT, "Excess message read");
                return 0;
        }
 
@@ -1714,7 +1707,7 @@ static void ospf6_send(struct in6_addr *src, struct in6_addr *dst,
        /* send message */
        len = ospf6_sendmsg(src, dst, &oi->interface->ifindex, iovector);
        if (len != ntohs(oh->length))
-               zlog_err("Could not send entire message");
+               flog_err(EC_LIB_DEVELOPMENT, "Could not send entire message");
 }
 
 static uint32_t ospf6_packet_max(struct ospf6_interface *oi)