464xlat: delete SNATed conntracks on interface teardown
authorAlin Nastac <alin.nastac@gmail.com>
Wed, 8 Jun 2022 09:58:00 +0000 (11:58 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Sun, 19 Jun 2022 19:54:05 +0000 (21:54 +0200)
Existing conntracks will continue to be SNATed to 192.0.0.1 even after
464xlat interface gets teared down. To prevent this, matching
conntracks must be killed.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
package/network/ipv6/464xlat/Makefile
package/network/ipv6/464xlat/files/464xlat.sh

index c792323235feaa3384dcb1bd15dd2d870b868094..ab09b1e6ddb3fef8ec84db63c7c84f4da3883644 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=464xlat
-PKG_RELEASE:=12
+PKG_RELEASE:=13
 
 PKG_SOURCE_DATE:=2018-01-16
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
index c90ac1af59a7972c61499a7e5c301860345d5ffa..dbe38b3cacfd09ce1c8bc285dbc63822556fb41a 100755 (executable)
@@ -98,6 +98,9 @@ proto_464xlat_teardown() {
                ip -6 rule del from all lookup local
                ip -6 rule add from all lookup local pref 0
        fi
+
+       # Kill conntracks SNATed to 192.0.0.1
+       echo 192.0.0.1 > /proc/net/nf_conntrack
 }
 
 proto_464xlat_init_config() {