From ef7ef09af84b9b4f0780b8f3229fdbc42fdec0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 17 Jun 2022 08:52:15 +0200 Subject: [PATCH] gluon-mesh-layer3-common: add package --- package/gluon-mesh-layer3-common/Makefile | 12 +++++++++ .../lib/gluon/upgrade/310-layer3-firewall | 25 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 package/gluon-mesh-layer3-common/Makefile create mode 100755 package/gluon-mesh-layer3-common/luasrc/lib/gluon/upgrade/310-layer3-firewall 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')