]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove worker configuration from the directory watcher
authorAlan T. DeKok <aland@freeradius.org>
Wed, 14 Feb 2018 19:15:15 +0000 (14:15 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 14 Feb 2018 19:15:15 +0000 (14:15 -0500)
raddb/sites-available/detail
src/modules/proto_detail/proto_detail_file.c

index 4515144d985b80cc2ff8957c7cde70f6c66f4b63..9224b2db7a7669a5e83cc30e2f69023a656cf3d6 100644 (file)
@@ -106,16 +106,6 @@ virtual_server detail {
                        #
                        filename.work = "${confdir}/detail.work"
 
-                       #
-                       #  Track progress through the detail file.  When the detail
-                       #  file is large, and the server is re-started, it will
-                       #  read from the START of the file.
-                       #
-                       #  Setting "track = yes" means it will skip packets which
-                       #  have already been processed.  The default is "no".
-                       #
-                       track = yes
-
                        #
                        #  If there are no detail files in the directory,
                        #  the listener will periodically wake up to check
@@ -123,81 +113,6 @@ virtual_server detail {
                        #
                        #  Allowed values: 1 to 3600
                        poll_interval = 5
-
-                       #
-                       #  The maximum size (in bytes) of one entry in
-                       #  the detail file.  If this setting is too
-                       #  low, then the "too large" entries in the
-                       #  detail file will be ignored.
-                       #
-                       #  Due to limitations in the detail file
-                       #  reader, if multiple entries fit into this
-                       #  size, then all of those entries will be
-                       #  read and processed, before further reading
-                       #  is done from the file.
-                       #
-                       max_entry_size = 65536
-
-                       #
-                       #  Whether or not the module retransmits
-                       #  packets which have failed.
-                       #
-                       #  default = yes
-                       #
-                       retransmit = yes
-
-                       #
-                       #  Limits for the files, retransmissions, etc.
-                       #
-                       limit {
-                               #
-                               #  Number of simultaneous packets it will
-                               #  read from the file.
-                               #
-                               #  Useful values: 1..256
-                               maximum_outstanding = 1
-
-                               #
-                               #  Initial retransmit time: 1..60
-                               #
-                               #  If there is no response within this time,
-                               #  the module will retransmit the packet.
-                               #
-                               initial_retransmission_time = 1
-
-                               #
-                               #  Maximum Retransmit Time: 5..30
-                               #
-                               #  The maximum time between retransmissions.
-                               #
-                               maximum_retransmission_time = 30
-
-                               #
-                               #  The following are maximums that *all* apply.
-                               #  i.e. if any one of the limits is hit, the
-                               #  retransmission stops.
-                               #
-
-                               #
-                               #  Maximum Retransmit Count: 0..20
-                               #
-                               #  How many times the module will send the packet
-                               #  before giving up.
-                               #
-                               #  A special value of "0" means "retransmit forever".
-                               #
-                               maximum_retransmission_count = 6
-
-                               #
-                               #  Maximum Retransmit Duration: 0..600
-                               #
-                               #  The total length of time the module will try to
-                               #  retransit the packet
-                               #
-                               #  A special value of "0" means "retransmit forever".
-                               #
-                               maximum_retransmission_duration = 40
-                       }
                }
        }
 
index 4f7141d48e5ac521cbc23c882d44fc474209e8d0..be0e542f452590e162bc4e5dc2312c0a926c90b4 100644 (file)
@@ -60,32 +60,13 @@ typedef struct proto_detail_work_t proto_detail_file_t;
 static void work_init(proto_detail_file_t *inst);
 static void mod_vnode_delete(fr_event_list_t *el, int fd, UNUSED int fflags, void *ctx);
 
-static CONF_PARSER limit_config[] = {
-       { FR_CONF_OFFSET("initial_retransmission_time", FR_TYPE_UINT32, proto_detail_work_t, irt), .dflt = STRINGIFY(2) },
-       { FR_CONF_OFFSET("maximum_retransmission_time", FR_TYPE_UINT32, proto_detail_work_t, mrt), .dflt = STRINGIFY(16) },
-       { FR_CONF_OFFSET("maximum_retransmission_count", FR_TYPE_UINT32, proto_detail_work_t, mrc), .dflt = STRINGIFY(5) },
-       { FR_CONF_OFFSET("maximum_retransmission_duration", FR_TYPE_UINT32, proto_detail_work_t, mrd), .dflt = STRINGIFY(30) },
-       { FR_CONF_OFFSET("maximum_outstanding", FR_TYPE_UINT32, proto_detail_work_t, max_outstanding), .dflt = STRINGIFY(1) },
-       CONF_PARSER_TERMINATOR
-};
-
-
 static const CONF_PARSER file_listen_config[] = {
        { FR_CONF_OFFSET("filename", FR_TYPE_STRING | FR_TYPE_REQUIRED, proto_detail_file_t, filename ) },
 
        { FR_CONF_OFFSET("filename.work", FR_TYPE_STRING, proto_detail_work_t, filename_work ) },
 
-       { FR_CONF_OFFSET("track", FR_TYPE_BOOL, proto_detail_file_t, track_progress), .dflt = "yes" },
-
        { FR_CONF_OFFSET("poll_interval", FR_TYPE_UINT32, proto_detail_file_t, poll_interval), .dflt = "5" },
 
-       /*
-        *      These are copied to the worker.
-        */
-       { FR_CONF_OFFSET("retransmit", FR_TYPE_BOOL, proto_detail_work_t, retransmit ), .dflt = "yes" },
-
-       { FR_CONF_POINTER("limit", FR_TYPE_SUBSECTION, NULL), .subcs = (void const *) limit_config },
-
        CONF_PARSER_TERMINATOR
 };
 
@@ -704,26 +685,6 @@ static int mod_bootstrap(void *instance, CONF_SECTION *cs)
        inst->mode = O_RDWR;
        inst->vnode_fd = -1;
 
-       if (inst->retransmit) {
-               FR_INTEGER_BOUND_CHECK("limit.initial_retransmission_time", inst->irt, >=, 1);
-               FR_INTEGER_BOUND_CHECK("limit.initial_retransmission_time", inst->irt, <=, 60);
-
-               /*
-                *      If you need more than this, just set it to
-                *      "0", and check Packet-Transmit-Count manually.
-                */
-               FR_INTEGER_BOUND_CHECK("limit.maximum_retransmission_count", inst->mrc, <=, 20);
-               FR_INTEGER_BOUND_CHECK("limit.maximum_retransmission_duration", inst->mrd, <=, 600);
-
-               /*
-                *      This is a reasonable value.
-                */
-               FR_INTEGER_BOUND_CHECK("limit.maximum_retransmission_timer", inst->mrt, <=, 30);
-       }
-
-       FR_INTEGER_BOUND_CHECK("limit.maximum_outstanding", inst->max_outstanding, >=, 1);
-       FR_INTEGER_BOUND_CHECK("limit.maximum_outstanding", inst->max_outstanding, <=, 256);
-
        return 0;
 }