]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_msdp_packet.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / pimd / pim_msdp_packet.c
index 11efc158e96778116b058c7aceb7e4f237d5567a..39e39b9557fe8596fce50952c643e016c3ad1fe2 100644 (file)
 #include <lib/stream.h>
 #include <lib/thread.h>
 #include <lib/vty.h>
+#include <lib/lib_errors.h>
 
 #include "pimd.h"
 #include "pim_str.h"
+#include "pim_errors.h"
 
 #include "pim_msdp.h"
 #include "pim_msdp_packet.h"
@@ -145,7 +147,8 @@ static void pim_msdp_connect_check(struct pim_msdp_peer *mp)
 
        /* If getsockopt is fail, this is fatal error. */
        if (ret < 0) {
-               zlog_err("can't get sockopt for nonblocking connect");
+               flog_err_sys(EC_LIB_SOCKET,
+                            "can't get sockopt for nonblocking connect");
                pim_msdp_peer_reset_tcp_conn(mp, "connect-failed");
                return;
        }
@@ -221,7 +224,7 @@ int pim_msdp_write(struct thread *thread)
                writenum = stream_get_endp(s) - stream_get_getp(s);
 
                /* Call write() system call */
-               num = write(mp->fd, STREAM_PNT(s), writenum);
+               num = write(mp->fd, stream_pnt(s), writenum);
                if (num < 0) {
                        /* write failed either retry needed or error */
                        if (ERRNO_IO_RETRY(errno)) {
@@ -481,7 +484,8 @@ static void pim_msdp_pkt_sa_rx_one(struct pim_msdp_peer *mp, struct in_addr rp)
 
        if (prefix_len != 32) {
                /* ignore SA update if the prefix length is not 32 */
-               zlog_err("rxed sa update with invalid prefix length %d",
+               flog_err(EC_PIM_MSDP_PACKET,
+                        "rxed sa update with invalid prefix length %d",
                         prefix_len);
                return;
        }