[ISSUE] AFWall+ v3.6.0 Duplicate Rules in Chain "afwall" Defined by Custom Script after Switching Interface
coldspring67 opened this issue · comments
*** Issue ***
After switching the interface the rules in chain "afwall" from a custom script are duplicated.
*** Steps to reproduce the problem ***
- Clear custom script in AFWall+
- Wifi on and 4G off
- Define a custom script which adds one or more rules to chain "afwall":
a) Define a rule directly (e.g. "IPTABLES=/system/bin/iptables; $IPTABLES -A "afwall" -d 22.22.22.0/21 -j REJECT") or
b) Include a script with rules (e.g. ". /data/local/rules.sh") - Wifi off
- 4G on -> the rules in chain "afwall" from custom script are there twice
- 4G off
- Wifi on -> the rules in chain "afwall" from custom script are there three times
*** Expected behaviour ***
The rules in chain "afwall" from custom script are there once even after switching interface, because:
"Please note that all those chains [afwall etc.] are guaranteed to be cleared before the custom script is executed, so you don't need to worry about rules cleanup on your script IF you are using those chains." (https://github.com/ukanth/afwall/wiki/CustomScripts#adding-custom-rules)
*** Hard- and software ***
Device: Samsung Galaxy S5 SM-G900F
Android OS: LineageOS v18.1 (Android 11)
AFWall+: v3.6.0 from F-Droid (profile mode: whitelist)
Superuser: Magisk v24.3
Please let me know, if further information is needed.
Thank you, ukanth for great work!
I'm seeing a similar behavior adding a rule to afwall-wifi
chain