File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- 2.10.1
1+ 2.10.0
Original file line number Diff line number Diff line change @@ -86,6 +86,29 @@ reload_service() {
8686 kill -1 $(cat "$PIDFILE")
8787}
8888
89+ validate_config() {
90+ if [[ "$NFQWS_ARGS" =~ "--new" ]]; then
91+ echo "Using --new in NFQWS_ARGS is not allowed. Use NFQWS_ARGS_CUSTOM instead"
92+ return 1
93+ fi
94+ if [[ "$NFQWS_ARGS_QUIC" =~ "--new" ]]; then
95+ echo "Using --new in NFQWS_ARGS_QUIC is not allowed. Use NFQWS_ARGS_CUSTOM instead"
96+ return 1
97+ fi
98+ if [[ "$NFQWS_ARGS_UDP" =~ "--new" ]]; then
99+ echo "Using --new in NFQWS_ARGS_UDP is not allowed. Use NFQWS_ARGS_CUSTOM instead"
100+ return 1
101+ fi
102+ if [[ "$NFQWS_EXTRA_ARGS" =~ "--new" ]]; then
103+ echo "Using --new in NFQWS_EXTRA_ARGS is not allowed. Use NFQWS_ARGS_CUSTOM instead"
104+ return 1
105+ fi
106+ if [[ "$NFQWS_ARGS_IPSET" =~ "--new" ]]; then
107+ echo "Using --new in NFQWS_ARGS_IPSET is not allowed. Use NFQWS_ARGS_CUSTOM instead"
108+ return 1
109+ fi
110+ }
111+
89112create_running_config() {
90113 local MARK=$(/bin/ndmc -c show ip policy 2>&1 | grep -i "description = $POLICY_NAME:" -A 1 | grep 'mark:' | grep -o '[^ ]*$' | head -n 1)
91114 if [ -n "$MARK" ]; then
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ start() {
44 return 1
55 fi
66
7+ validate_config || return 1
78 create_running_config
89 kernel_modules
910
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ extra_command "firewall_stop" "Unload firewall rules"
1313extra_command "kernel_modules" "Load kernel modules"
1414
1515start_service() {
16+ validate_config || return 1
1617 create_running_config
1718 kernel_modules
1819
You can’t perform that action at this time.
0 commit comments