summaryrefslogtreecommitdiff
path: root/proto/rpki
diff options
context:
space:
mode:
Diffstat (limited to 'proto/rpki')
-rw-r--r--proto/rpki/Makefile2
-rw-r--r--proto/rpki/packets.c4
-rw-r--r--proto/rpki/rpki.c11
-rw-r--r--proto/rpki/rpki.h1
4 files changed, 7 insertions, 11 deletions
diff --git a/proto/rpki/Makefile b/proto/rpki/Makefile
index bd76145e..eb09b7df 100644
--- a/proto/rpki/Makefile
+++ b/proto/rpki/Makefile
@@ -2,3 +2,5 @@ src := rpki.c packets.c tcp_transport.c ssh_transport.c transport.c
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
+
+tests_objs := $(tests_objs) $(src-o-files) \ No newline at end of file
diff --git a/proto/rpki/packets.c b/proto/rpki/packets.c
index b9d93106..60ca3936 100644
--- a/proto/rpki/packets.c
+++ b/proto/rpki/packets.c
@@ -531,8 +531,6 @@ rpki_send_pdu(struct rpki_cache *cache, const void *pdu, const uint len)
static int
rpki_check_receive_packet(struct rpki_cache *cache, const struct pdu_header *pdu)
{
- struct rpki_proto *p = cache->p;
- int error = RPKI_SUCCESS;
u32 pdu_len = ntohl(pdu->len);
/*
@@ -557,7 +555,6 @@ rpki_check_receive_packet(struct rpki_cache *cache, const struct pdu_header *pdu
*/
}
else if (cache->last_update == 0
- && pdu->ver >= RPKI_MIN_VERSION
&& pdu->ver <= RPKI_MAX_VERSION
&& pdu->ver < cache->version)
{
@@ -608,7 +605,6 @@ rpki_handle_error_pdu(struct rpki_cache *cache, const struct pdu_error *pdu)
case UNSUPPORTED_PROTOCOL_VER:
CACHE_TRACE(D_PACKETS, cache, "Client uses unsupported protocol version");
if (pdu->ver <= RPKI_MAX_VERSION &&
- pdu->ver >= RPKI_MIN_VERSION &&
pdu->ver < cache->version)
{
CACHE_TRACE(D_EVENTS, cache, "Downgrading from protocol version %d to version %d", cache->version, pdu->ver);
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index 6360dbaf..0d4b1fd3 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -358,7 +358,7 @@ rpki_stop_retry_timer_event(struct rpki_cache *cache)
tm_stop(cache->retry_timer);
}
-static void
+static void UNUSED
rpki_stop_expire_timer_event(struct rpki_cache *cache)
{
CACHE_DBG(cache, "Stop");
@@ -637,7 +637,7 @@ rpki_shutdown(struct proto *P)
*/
static int
-rpki_try_fast_reconnect(struct rpki_cache *cache, struct rpki_config *new, struct rpki_config *old)
+rpki_try_fast_reconnect(struct rpki_cache *cache)
{
if (cache->state == RPKI_CS_ESTABLISHED)
{
@@ -661,11 +661,10 @@ rpki_try_fast_reconnect(struct rpki_cache *cache, struct rpki_config *new, struc
* protocol. Returns |NEED_TO_RESTART| or |SUCCESSFUL_RECONF|.
*/
static int
-rpki_reconfigure_cache(struct rpki_proto *p, struct rpki_cache *cache, struct rpki_config *new, struct rpki_config *old)
+rpki_reconfigure_cache(struct rpki_proto *p UNUSED, struct rpki_cache *cache, struct rpki_config *new, struct rpki_config *old)
{
u8 try_fast_reconnect = 0;
-
if (strcmp(old->hostname, new->hostname) != 0)
{
CACHE_TRACE(D_EVENTS, cache, "Cache server address changed to %s", new->hostname);
@@ -710,7 +709,7 @@ rpki_reconfigure_cache(struct rpki_proto *p, struct rpki_cache *cache, struct rp
#undef TEST_INTERVAL
if (try_fast_reconnect)
- return rpki_try_fast_reconnect(cache, new, old);
+ return rpki_try_fast_reconnect(cache);
return SUCCESSFUL_RECONF;
}
@@ -907,7 +906,7 @@ rpki_postconfig(struct proto_config *CF)
static void
rpki_copy_config(struct proto_config *dest, struct proto_config *src)
{
- /* Just a shallow copy */
+ /* FIXME: Should copy transport */
}
struct protocol proto_rpki = {
diff --git a/proto/rpki/rpki.h b/proto/rpki/rpki.h
index eaeed858..80ef83df 100644
--- a/proto/rpki/rpki.h
+++ b/proto/rpki/rpki.h
@@ -29,7 +29,6 @@
#define RPKI_VERSION_0 0
#define RPKI_VERSION_1 1
-#define RPKI_MIN_VERSION RPKI_VERSION_0
#define RPKI_MAX_VERSION RPKI_VERSION_1