summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/init.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:41:05 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-05-23 15:41:05 +0000
commitc31fb6c24d6f0a07578eaf605e3e23eee777ee5b (patch)
tree7201ea8729d70e3a1689dfff2cc0b8147f4e996d /usr.sbin/ldpd/init.c
parent3590efdb36e7192ab935403c96039a3f78c9328a (diff)
Allow setting the session holdtime per neighbor.
Diffstat (limited to 'usr.sbin/ldpd/init.c')
-rw-r--r--usr.sbin/ldpd/init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ldpd/init.c b/usr.sbin/ldpd/init.c
index b888d8be954..4879ccce941 100644
--- a/usr.sbin/ldpd/init.c
+++ b/usr.sbin/ldpd/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.16 2016/05/23 15:14:07 renato Exp $ */
+/* $OpenBSD: init.c,v 1.17 2016/05/23 15:41:04 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -106,7 +106,8 @@ recv_init(struct nbr *nbr, char *buf, u_int16_t len)
return (-1);
}
- nbr->keepalive = min(leconf->keepalive, ntohs(sess.keepalive_time));
+ nbr->keepalive = min(nbr_get_keepalive(nbr->addr),
+ ntohs(sess.keepalive_time));
if (!nbr_pending_idtimer(nbr))
nbr_fsm(nbr, NBR_EVT_INIT_RCVD);
@@ -126,7 +127,7 @@ gen_init_prms_tlv(struct ibuf *buf, struct nbr *nbr, u_int16_t size)
parms.type = htons(TLV_TYPE_COMMONSESSION);
parms.length = htons(size);
parms.proto_version = htons(LDP_VERSION);
- parms.keepalive_time = htons(leconf->keepalive);
+ parms.keepalive_time = htons(nbr_get_keepalive(nbr->addr));
parms.reserved = 0;
parms.pvlim = 0;
parms.max_pdu_len = 0;