summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:25 +0000
commit289582b3dcbeb23328325d224c7db7de66a3a55f (patch)
tree989c36d57aab945c36e34c952f438746ce18b3bd /nhrpd
parentReleasing progress-linux version 10.0.1-0.1~progress7.99u1. (diff)
downloadfrr-289582b3dcbeb23328325d224c7db7de66a3a55f.tar.xz
frr-289582b3dcbeb23328325d224c7db7de66a3a55f.zip
Merging upstream version 10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/debug.h2
-rw-r--r--nhrpd/nhrp_nhs.c12
-rw-r--r--nhrpd/os.h1
-rw-r--r--nhrpd/reqid.c2
-rw-r--r--nhrpd/vici.h1
5 files changed, 15 insertions, 3 deletions
diff --git a/nhrpd/debug.h b/nhrpd/debug.h
index f2c7022..d5c00ad 100644
--- a/nhrpd/debug.h
+++ b/nhrpd/debug.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
#include "log.h"
#define NHRP_DEBUG_COMMON (1 << 0)
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index acd3b7d..f779f93 100644
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -169,9 +169,15 @@ static void nhrp_reg_send_req(struct event *t)
struct nhrp_cie_header *cie;
if (!nhrp_peer_check(r->peer, 2)) {
- debugf(NHRP_DEBUG_COMMON, "NHS: Waiting link for %pSU",
- &r->peer->vc->remote.nbma);
- event_add_timer(master, nhrp_reg_send_req, r, 120,
+ int renewtime = if_ad->holdtime / 4;
+ /* RFC 2332 5.2.0.1 says "a retry is sent after an appropriate
+ * interval." Using holdtime/4, to be shorter than
+ * recommended renew time (holdtime/3), see RFC2332 Sec 5.2.3
+ */
+ debugf(NHRP_DEBUG_COMMON,
+ "NHS: Waiting link for %pSU, retrying in %d seconds",
+ &r->peer->vc->remote.nbma, renewtime);
+ event_add_timer(master, nhrp_reg_send_req, r, renewtime,
&r->t_register);
return;
}
diff --git a/nhrpd/os.h b/nhrpd/os.h
index 2b9e07f..3f3b0de 100644
--- a/nhrpd/os.h
+++ b/nhrpd/os.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
int os_socket(void);
int os_sendmsg(const uint8_t *buf, size_t len, int ifindex, const uint8_t *addr,
diff --git a/nhrpd/reqid.c b/nhrpd/reqid.c
index 738e935..c2f5d24 100644
--- a/nhrpd/reqid.c
+++ b/nhrpd/reqid.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
#include "zebra.h"
#include "hash.h"
#include "nhrpd.h"
diff --git a/nhrpd/vici.h b/nhrpd/vici.h
index f2ad3a9..8a8011f 100644
--- a/nhrpd/vici.h
+++ b/nhrpd/vici.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
enum vici_type_t {
VICI_START = 0,