From 2dd7c4aac7a309ef51189d58eadb900a1e94615c Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Mon, 8 Aug 2011 22:49:28 -0400 Subject: [PATCH] Minor rename in support of non-dbm file cache Added the optional_dbm_support branch and made a minor renaming change on this branch for the coming non-dbm file cache support. --- server/Makefile.am | 2 +- server/fwknopd.c | 4 ++-- server/incoming_spa.c | 2 +- server/{replay_dbm.c => replay_cache.c} | 10 ++++++---- server/{replay_dbm.h => replay_cache.h} | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) rename server/{replay_dbm.c => replay_cache.c} (96%) rename server/{replay_dbm.h => replay_cache.h} (94%) diff --git a/server/Makefile.am b/server/Makefile.am index 7d992bb7..e7b4bebc 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -4,7 +4,7 @@ fwknopd_SOURCES = fwknopd.c fwknopd.h config_init.c config_init.h \ fwknopd_common.h incoming_spa.c incoming_spa.h \ pcap_capture.c pcap_capture.h process_packet.c \ process_packet.h log_msg.c log_msg.h utils.c utils.h \ - sig_handler.c sig_handler.h replay_dbm.c replay_dbm.h \ + sig_handler.c sig_handler.h replay_cache.c replay_cache.h \ access.c access.h fwknopd_errors.c fwknopd_errors.h \ tcp_server.c tcp_server.h extcmd.c extcmd.h \ fw_util.c fw_util.h fw_util_ipf.c fw_util_ipf.h \ diff --git a/server/fwknopd.c b/server/fwknopd.c index fd536041..c7d88278 100644 --- a/server/fwknopd.c +++ b/server/fwknopd.c @@ -37,7 +37,7 @@ #include "utils.h" #include "fw_util.h" #include "sig_handler.h" -#include "replay_dbm.h" +#include "replay_cache.h" #include "tcp_server.h" /* Prototypes @@ -239,7 +239,7 @@ main(int argc, char **argv) dump_access_list(&opts); } - /* Initialize the digest cache (replay attack detection dbm) + /* Initialize the digest cache for replay attack detection * if so configured. */ if(strncasecmp(opts.config[CONF_ENABLE_DIGEST_PERSISTENCE], "Y", 1) == 0) diff --git a/server/incoming_spa.c b/server/incoming_spa.c index f7e765eb..467fb18a 100644 --- a/server/incoming_spa.c +++ b/server/incoming_spa.c @@ -42,7 +42,7 @@ #include "utils.h" #include "fw_util.h" #include "fwknopd_errors.h" -#include "replay_dbm.h" +#include "replay_cache.h" /* Validate and in some cases preprocess/reformat the SPA data. Return an * error code value if there is any indication the data is not valid spa data. diff --git a/server/replay_dbm.c b/server/replay_cache.c similarity index 96% rename from server/replay_dbm.c rename to server/replay_cache.c index 36944eb5..085823d6 100644 --- a/server/replay_dbm.c +++ b/server/replay_cache.c @@ -1,13 +1,15 @@ /* ***************************************************************************** * - * File: replay_dbm.c + * File: replay_cache.c * * Author: Damien S. Stuart * * Purpose: Provides the functions to check for possible replay attacks - * by using a dbm (ndbm or gdbm in ndbm compatibility mode) file - * to store a digest of previously received SPA packets. + * by using a cache of previously seen digests. This cache is a + * simple file by default, but can be made to use a dbm solution + * (ndbm or gdbm in ndbm compatibility mode) file to store the digest + * of a previously received SPA packets. * * Copyright 2010 Damien Stuart (dstuart@dstuart.org) * @@ -30,7 +32,7 @@ * ***************************************************************************** */ -#include "replay_dbm.h" +#include "replay_cache.h" #include "log_msg.h" #include "fwknopd_errors.h" diff --git a/server/replay_dbm.h b/server/replay_cache.h similarity index 94% rename from server/replay_dbm.h rename to server/replay_cache.h index b38340b5..88665ebc 100644 --- a/server/replay_dbm.h +++ b/server/replay_cache.h @@ -1,11 +1,11 @@ /* ***************************************************************************** * - * File: replay_dbm.h + * File: replay_cache.h * * Author: Damien Stuart (dstuart@dstuart.org) * - * Purpose: Header file for fwknopd replay_dbm.c functions. + * Purpose: Header file for fwknopd replay_cache.c functions. * * Copyright 2010 Damien Stuart (dstuart@dstuart.org) *