Skip to content

Commit ab68ff0

Browse files
committed
Fixed bug: regexes stoped to work
after reloading the config.
1 parent 28f9eee commit ab68ff0

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

fw/vhost.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,6 +2392,9 @@ tfw_vhost_cfgstart(void)
23922392
{
23932393
TfwVhost *vh_dflt;
23942394

2395+
number_of_regex = 0;
2396+
number_of_db_regex = 0;
2397+
23952398
BUG_ON(tfw_vhosts_reconfig);
23962399
tfw_vhosts_reconfig = kmalloc(sizeof(TfwVhostList), GFP_KERNEL);
23972400
if (!tfw_vhosts_reconfig) {

scripts/regex_start.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ tmp_path="/tmp/tempesta"
77
for filename in ${tmp_path}/*.txt; do
88
name=$(basename "$filename" .txt)
99
db_path="/sys/kernel/config/rex/${name}"
10-
echo $dbpath
1110

1211
rm -rf ${tmp_path}/out/ && mkdir ${tmp_path}/out
13-
echo "${script_path}/hscollider -e ${filename} -V2 -ao ${tmp_path}/out/ -n1"
14-
#${script_path}/hscollider -e ${filename} -ao ${tmp_path}/out/ -n1
12+
#${script_path}/hscollider -e ${filename} -ao ${tmp_path}/out/ -n1 #this version for single block strings
1513
${script_path}/hscollider -e ${filename} -V5 -ao ${tmp_path}/out/ -n1
1614

1715
mkdir $db_path

scripts/tempesta.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,12 @@ reload()
317317
{
318318
update_js_challenge_templates
319319
echo "Running live reconfiguration of Tempesta..."
320+
$script_path/regex_stop.sh
320321
err=$(start_tempesta_and_check)
321322
if [[ $err != "0" ]]; then
322323
error "cannot reconfigure Tempesta FW (sysctl message: ${err##*: }), please check dmesg"
323324
else
325+
$script_path/regex_start.sh
324326
echo "done"
325327
remove_tmp_conf
326328
fi

0 commit comments

Comments
 (0)