diff --git a/package/gluon-mesh-layer3-common/Makefile b/package/gluon-mesh-layer3-common/Makefile new file mode 100644 index 00000000..45ad2f57 --- /dev/null +++ b/package/gluon-mesh-layer3-common/Makefile @@ -0,0 +1,12 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gluon-mesh-layer3-common + +include ../gluon.mk + +define Package/gluon-mesh-layer3-common + TITLE:=Layer3 common files + DEPENDS:=+gluon-core +gluon-mmfd +firewall +endef + +$(eval $(call BuildPackageGluon,gluon-mesh-layer3-common)) diff --git a/package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/310-layer3-firewall b/package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/310-layer3-firewall new file mode 100755 index 00000000..b6f53384 --- /dev/null +++ b/package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/310-layer3-firewall @@ -0,0 +1,25 @@ +#!/usr/bin/lua + +local uci = require('simple-uci').cursor() + +uci:section('firewall', 'forwarding', 'fcc', { + src = 'loc_client', + dest = 'loc_client', +}) + +uci:section('firewall', 'forwarding', 'fcm', { + src = 'loc_client', + dest = 'mesh', +}) + +uci:section('firewall', 'forwarding', 'fmc', { + src = 'mesh', + dest = 'loc_client', +}) + +uci:section('firewall', 'forwarding', 'fmm', { + src = 'mesh', + dest = 'mesh', +}) + +uci:save('firewall')