summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldpd/labelmapping.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2013-06-01 19:42:07 +0000
committerclaudio <claudio@openbsd.org>2013-06-01 19:42:07 +0000
commitb93f77ccdfc6a49e1537d7cbc14d96b4ef4fad06 (patch)
tree4b7e159f3a76aac2b458b4dedb30b0eae1ed8d9a /usr.sbin/ldpd/labelmapping.c
parentAdjust ldpctl to the latest ldpd changes. (diff)
downloadwireguard-openbsd-b93f77ccdfc6a49e1537d7cbc14d96b4ef4fad06.tar.xz
wireguard-openbsd-b93f77ccdfc6a49e1537d7cbc14d96b4ef4fad06.zip
Restart the keepalive timer whenever a LDP PDU is sent. There is no need
to send a keepalive packet when a other PDU was sent out. Also add a missing NBR_EVT_PDU_RCVD call to recv_address() which restarts the session keepalive timeout. All other places already do that. Diff by Renato Westphal
Diffstat (limited to 'usr.sbin/ldpd/labelmapping.c')
-rw-r--r--usr.sbin/ldpd/labelmapping.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/labelmapping.c b/usr.sbin/ldpd/labelmapping.c
index 268e44b88da..f4fd3566f25 100644
--- a/usr.sbin/ldpd/labelmapping.c
+++ b/usr.sbin/ldpd/labelmapping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: labelmapping.c,v 1.22 2013/06/01 19:01:32 claudio Exp $ */
+/* $OpenBSD: labelmapping.c,v 1.23 2013/06/01 19:42:07 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -84,6 +84,7 @@ send_labelmapping(struct nbr *nbr)
ldp_hdr->length = htons(size);
evbuf_enqueue(&nbr->wbuf, buf);
+ nbr_fsm(nbr, NBR_EVT_PDU_SENT);
}
int
@@ -184,6 +185,7 @@ send_labelrequest(struct nbr *nbr)
ldp_hdr->length = htons(size);
evbuf_enqueue(&nbr->wbuf, buf);
+ nbr_fsm(nbr, NBR_EVT_PDU_SENT);
}
int
@@ -280,6 +282,7 @@ send_labelwithdraw(struct nbr *nbr)
ldp_hdr->length = htons(size);
evbuf_enqueue(&nbr->wbuf, buf);
+ nbr_fsm(nbr, NBR_EVT_PDU_SENT);
}
int
@@ -412,6 +415,7 @@ send_labelrelease(struct nbr *nbr)
ldp_hdr->length = htons(size);
evbuf_enqueue(&nbr->wbuf, buf);
+ nbr_fsm(nbr, NBR_EVT_PDU_SENT);
}
int
@@ -522,6 +526,7 @@ send_labelabortreq(struct nbr *nbr)
gen_msg_tlv(buf, MSG_TYPE_LABELABORTREQ, size);
evbuf_enqueue(&nbr->wbuf, buf);
+ nbr_fsm(nbr, NBR_EVT_PDU_SENT);
}
int