When a new service becomes ready or online, it's checked if its technology
is more preferred than the one used by the currrent default gateway.
If so, this new service becomes the new default gateway.
When the tethering is enabled, a NAT rule is created to forward the
traffic between the interface playing the AP role and the interface
connected to current default gateway. The problem comes out when the
default gateway changes, because the NAT rule is disabled but not
removed from the firewall's rules list. Therefore, when the new rule is
installed also the old rule is installed because it is still in the list.
If it changes again, then three rules will be installed, and so on. They
are never removed.
This patch adds a deletion of all the rules from the firewall list exactly
after they are disabled to avoid the described problem.
Jose Blanquicet (1):
firewall: Remove old rules
src/firewall.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--
1.9.1
Show replies by date