]> git.proxmox.com Git - mirror_frr.git/blobdiff - ldpd/keepalive.c
Merge pull request #3405 from LabNConsulting/working/master/fix-vrf
[mirror_frr.git] / ldpd / keepalive.c
index 4cd49d485bbc303abcdc04ca4a7f71e6db05dd0f..ba5f2233162da9637c3def43eeee0a09beb679df 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include <sys/types.h>
-#include <string.h>
+#include <zebra.h>
 
 #include "ldpd.h"
 #include "ldpe.h"
 #include "log.h"
+#include "ldp_debug.h"
 
 void
 send_keepalive(struct nbr *nbr)
@@ -37,7 +37,10 @@ send_keepalive(struct nbr *nbr)
        size -= LDP_HDR_SIZE;
        gen_msg_hdr(buf, MSG_TYPE_KEEPALIVE, size);
 
+       debug_kalive_send("keepalive: lsr-id %s", inet_ntoa(nbr->id));
+
        evbuf_enqueue(&nbr->tcp->wbuf, buf);
+       nbr->stats.kalive_sent++;
 }
 
 int
@@ -51,6 +54,8 @@ recv_keepalive(struct nbr *nbr, char *buf, uint16_t len)
                return (-1);
        }
 
+       debug_kalive_recv("keepalive: lsr-id %s", inet_ntoa(nbr->id));
+
        if (nbr->state != NBR_STA_OPER)
                nbr_fsm(nbr, NBR_EVT_KEEPALIVE_RCVD);