Skip to content

Commit 61def20

Browse files
committed
firewall: switch to nftables
1 parent 5ed8508 commit 61def20

File tree

18 files changed

+37
-37
lines changed

18 files changed

+37
-37
lines changed

package/gluon-core/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ define Package/gluon-core
1111
TITLE:=Base files of Gluon
1212
DEPENDS:= \
1313
+gluon-site +libgluonutil +libiwinfo-lua +lua-platform-info +lua-simple-uci +lua-hash +lua-jsonc \
14-
+luabitop +luaposix +vxlan +odhcp6c +firewall +pretty-hostname
14+
+luabitop +luaposix +vxlan +odhcp6c +firewall4 +pretty-hostname
1515
endef
1616

1717
define Package/gluon-core/description

package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#define BATCTL_DC "/usr/sbin/batctl dc -H -n"
1616
#define BATCTL_TL "/usr/sbin/batctl tl -H -n"
17-
#define EBTABLES "/usr/sbin/ebtables-tiny"
17+
#define EBTABLES "/usr/sbin/ebtables"
1818

1919
#define BUILD_BUG_ON(check) ((void)sizeof(int[1-2*!!(check)]))
2020

package/gluon-ebtables/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ include ../gluon.mk
66

77
define Package/gluon-ebtables
88
TITLE:=Ebtables support
9-
DEPENDS:=+gluon-core +ebtables-tiny \
10-
+kmod-ebtables +kmod-ebtables-ipv4 +kmod-ebtables-ipv6
9+
DEPENDS:=+gluon-core +ebtables-nft
1110
endef
1211

1312
define Package/gluon-ebtables/description

package/gluon-ebtables/files/etc/init.d/gluon-ebtables

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ exec_all() {
5151

5252
start() {
5353
(
54-
export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -A " .. command'
55-
export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -N " .. name .. " -P " .. policy'
54+
export EBTABLES_RULE='"ebtables -t " .. table .. " -A " .. command'
55+
export EBTABLES_CHAIN='"ebtables -t " .. table .. " -N " .. name .. " -P " .. policy'
5656

5757
# Contains /var/lib/ebtables/lock for '--concurrent'
5858
[ ! -d "/var/lib/ebtables" ] && \
@@ -68,8 +68,8 @@ start() {
6868

6969
stop() {
7070
(
71-
export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -D " .. command'
72-
export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -X " .. name'
71+
export EBTABLES_RULE='"ebtables -t " .. table .. " -D " .. command'
72+
export EBTABLES_CHAIN='"ebtables -t " .. table .. " -X " .. name'
7373

7474
if [ -z "$1" ]; then
7575
exec_all '-r'

package/gluon-iptables-clamp-mss-to-pmtu/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ include ../gluon.mk
66

77
define Package/$(PKG_NAME)
88
TITLE:=This will establish a firewall rule to clamp the mss to pmtu on the mesh-vpn interface when the connection is towards 64:ff9b::/96
9-
DEPENDS:= +ip6tables-zz-legacy
109
endef
1110

1211
define Package/$(PKG_NAME)/description

package/gluon-iptables-clamp-mss-to-pmtu/files/lib/gluon/mesh-vpn/iptables-mss.rules

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oifname "mesh-vpn*" tcp flags & (syn|rst) == syn counter tcp option maxseg size set rt mtu

package/gluon-iptables-clamp-mss-to-pmtu/luasrc/lib/gluon/upgrade/800-iptables-mesh-vpn-clamp-mss-to-pmtu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
local uci = require('simple-uci').cursor()
44
uci:section('firewall', 'include', 'vpn_clamp_mss', {
5-
family = 'ipv6',
6-
type = 'restore',
7-
path = '/lib/gluon/mesh-vpn/iptables-mss.rules'
5+
type = 'nftables',
6+
position = 'chain-prepend',
7+
chain = 'mangle_forward',
8+
path = '/lib/gluon/mesh-vpn/nftables-mss.rules',
89
})
910

1011
uci:save('firewall')

package/gluon-mesh-babel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include ../gluon.mk
99

1010
define Package/gluon-mesh-babel
1111
TITLE:=Babel mesh
12-
DEPENDS:=+gluon-core +babeld +gluon-mesh-layer3-common +libiwinfo +libgluonutil +firewall +libjson-c +libnl-tiny +libubus +libubox +libblobmsg-json +libbabelhelper +luabitop
12+
DEPENDS:=+gluon-core +babeld +gluon-mesh-layer3-common +libiwinfo +libgluonutil +firewall4 +libjson-c +libnl-tiny +libubus +libubox +libblobmsg-json +libbabelhelper +luabitop
1313
PROVIDES:=gluon-mesh-provider
1414
endef
1515

package/gluon-mesh-batman-adv/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ define Package/gluon-mesh-batman-adv-15
1313
+libgluonutil \
1414
+gluon-client-bridge \
1515
+gluon-ebtables \
16-
+firewall \
16+
+firewall4 \
1717
+libiwinfo \
1818
+kmod-dummy \
1919
+libnl-tiny \

0 commit comments

Comments
 (0)