diff --git a/build_num b/build_num index 39acaa7d4..f9240b74b 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 3149 +#define BUILD_NUM 3150 diff --git a/doc/ChangeLog b/doc/ChangeLog index bca3dd12c..50074d6bf 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,9 +1,19 @@ 2010-07-23 Vadim Kurland + * Fixes #1635: included code generated by the configlet + run_time_address_tables into script for all linux-based host + OS (dd-wrt, openwrt, ipcop) even though most of they do not + support ipset at this time. If ipset is not supported because + iptables version is too old or the module is simply not available + for the platform, user can just uncheck the checkbox in the + firewall settings dialog and code generated by the configlet will + support method of loading addresses from the file at run time + based on script variables and a "while" loop. + * script_skeleton: added command line argument "reload_ipset" that calls function reload_ipset and takes two additional arguments: set name and file name. - + * script_skeleton (cmd): calling functions to check if data files used by run time address table objects are available before making any changes to iptables policy. If files are not available, the diff --git a/src/res/configlets/dd-wrt-jffs/script_skeleton b/src/res/configlets/dd-wrt-jffs/script_skeleton index 950db38d7..329eb6af5 100644 --- a/src/res/configlets/dd-wrt-jffs/script_skeleton +++ b/src/res/configlets/dd-wrt-jffs/script_skeleton @@ -21,6 +21,8 @@ FWBDEBUG="" {{$shell_functions}} +{{$run_time_address_tables}} + load_modules() { : {{$load_modules}} @@ -81,6 +83,11 @@ case "$cmd" in start) log "Activating firewall script generated {{$timestamp}} by {{$user}}" check_tools + check_run_time_address_table_files + {{if using_ipset}} + check_module_ipset + load_run_time_address_table_files + {{endif}} {{if prolog_top}} prolog_commands {{endif}} load_modules {{$load_modules_with_nat}} configure_interfaces @@ -121,8 +128,15 @@ case "$cmd" in RETVAL=$? ;; +## Usage: script.fw reload_ipset + reload_ipset) +{{if using_ipset}} + reload_ipset $2 $3 +{{endif}} + ;; + *) - echo "Usage $0 {start|stop|status|reload|interfaces|test_interfaces}" + echo "Usage $0 {start|stop|status|reload|interfaces|test_interfaces|reload_ipset}" ;; esac diff --git a/src/res/configlets/dd-wrt-nvram/script_skeleton b/src/res/configlets/dd-wrt-nvram/script_skeleton index 70508a13c..94e5d217d 100644 --- a/src/res/configlets/dd-wrt-nvram/script_skeleton +++ b/src/res/configlets/dd-wrt-nvram/script_skeleton @@ -30,6 +30,8 @@ {{$shell_functions}} +{{$run_time_address_tables}} + load_modules() { : {{$load_modules}} @@ -76,6 +78,11 @@ reset_all() { log "Activating firewall script generated {{$timestamp}} by {{$user}}" check_tools +check_run_time_address_table_files +{{if using_ipset}} +check_module_ipset +load_run_time_address_table_files +{{endif}} {{if prolog_top}}prolog_commands{{endif}} load_modules configure_interfaces diff --git a/src/res/configlets/ipcop/script_skeleton b/src/res/configlets/ipcop/script_skeleton index 454423171..cbf6a17a1 100644 --- a/src/res/configlets/ipcop/script_skeleton +++ b/src/res/configlets/ipcop/script_skeleton @@ -23,6 +23,8 @@ {{$shell_functions}} +{{$run_time_address_tables}} + verify_interfaces() { : {{$verify_interfaces}} @@ -55,6 +57,11 @@ reset_all() { case "$1" in start) check_tools + check_run_time_address_table_files + {{if using_ipset}} + check_module_ipset + load_run_time_address_table_files + {{endif}} verify_interfaces prolog_commands script_body diff --git a/src/res/configlets/openwrt/script_skeleton b/src/res/configlets/openwrt/script_skeleton index 062797c49..88010fd68 100644 --- a/src/res/configlets/openwrt/script_skeleton +++ b/src/res/configlets/openwrt/script_skeleton @@ -25,6 +25,8 @@ FWBDEBUG="" {{$shell_functions}} +{{$run_time_address_tables}} + load_modules() { : {{$load_modules}} @@ -76,6 +78,11 @@ reset_all() { start() { log "Activating firewall script generated {{$timestamp}} by {{$user}}" check_tools + check_run_time_address_table_files + {{if using_ipset}} + check_module_ipset + load_run_time_address_table_files + {{endif}} {{if prolog_top}} prolog_commands {{endif}} load_modules {{$load_modules_with_nat}} configure_interfaces diff --git a/src/res/configlets/secuwall/script_skeleton b/src/res/configlets/secuwall/script_skeleton index 7d1707961..9e3821717 100644 --- a/src/res/configlets/secuwall/script_skeleton +++ b/src/res/configlets/secuwall/script_skeleton @@ -21,6 +21,8 @@ FWBDEBUG="" {{$shell_functions}} +{{$run_time_address_tables}} + load_modules() { : echo "Modules are loaded only at startup!" @@ -89,6 +91,11 @@ case "$cmd" in log "Activating firewall script generated {{$timestamp}} by {{$user}}" log "Database was {{$database}}" check_tools + check_run_time_address_table_files + {{if using_ipset}} + check_module_ipset + load_run_time_address_table_files + {{endif}} {{if prolog_top}} prolog_commands {{endif}} load_modules {{$load_modules_with_nat}} configure_interfaces diff --git a/src/res/configlets/sveasoft/script_skeleton b/src/res/configlets/sveasoft/script_skeleton index ad28854ce..1bd12a52b 100644 --- a/src/res/configlets/sveasoft/script_skeleton +++ b/src/res/configlets/sveasoft/script_skeleton @@ -30,6 +30,8 @@ {{$shell_functions}} +{{$run_time_address_tables}} + ## we do not load modules on Sveasoft load_modules() { : @@ -78,6 +80,11 @@ reset_all() { log "Activating firewall script generated {{$timestamp}} by {{$user}}" check_tools +check_run_time_address_table_files +{{if using_ipset}} +check_module_ipset +load_run_time_address_table_files +{{endif}} {{if prolog_top}}prolog_commands{{endif}} load_modules configure_interfaces