summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/peer.h b/src/peer.h
index 99d84f9..3451343 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -74,6 +74,8 @@ struct fastd_peer {
struct timespec establish_handshake_timeout; /**< A timeout during which all handshakes for this peer will be ignored after a new connection has been established */
#ifdef WITH_VERIFY
+ bool dynamic; /**< Specifies if the peer has been added dynamically by a on-verify script */
+
struct timespec verify_timeout; /**< Specifies the minimum time after which on-verify may be run again */
struct timespec verify_valid_timeout; /**< Specifies how long a peer stays valid after a successful on-verify run */
#endif
@@ -228,8 +230,12 @@ static inline bool fastd_peer_is_floating(const fastd_peer_t *peer) {
}
/** Checks if a peer is not statically configured, but added after a on-verify run */
-static inline bool fastd_peer_is_dynamic(const fastd_peer_t *peer) {
- return (!peer->config);
+static inline bool fastd_peer_is_dynamic(const fastd_peer_t *peer UNUSED) {
+#ifdef WITH_VERIFY
+ return peer->dynamic;
+#else
+ return false;
+#endif
}
/** Returns the currently active remote entry */