diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-07-07 15:34:53 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-08-06 08:34:19 +0200 |
commit | 96b87196b0788d4cdaa81a49a65d198d9f6c90d2 (patch) | |
tree | 0588181c2970b363428dc10c49bd83e7e74a15f3 /package/network/config/dsaconfig/Makefile | |
parent | 4c73c34ec4215deb690bf03faea2a0fe725476f0 (diff) | |
download | upstream-96b87196b0788d4cdaa81a49a65d198d9f6c90d2.tar.gz upstream-96b87196b0788d4cdaa81a49a65d198d9f6c90d2.tar.bz2 upstream-96b87196b0788d4cdaa81a49a65d198d9f6c90d2.zip |
dsaconfig: introduce package for UCI configuration of VLAN filter rules
This package provides the necessary files to translate `config dsa_vlan`
and `config dsa_port` sections of `/etc/config/network` into appropriate
bridge vlan filter rules.
The approach of the configuration is to bridge all DSA ports into a logical
bridge device, called "switch0" by default, and to set VLAN port membership,
tagging state and PVID as specified by UCI on each port and on the switch
bridge device itself, allowing logical interfaces to reference port VLAN
groups by using "switch0.N" as ifname, where N denotes the VLAN ID.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/network/config/dsaconfig/Makefile')
-rw-r--r-- | package/network/config/dsaconfig/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/package/network/config/dsaconfig/Makefile b/package/network/config/dsaconfig/Makefile new file mode 100644 index 0000000000..4069022224 --- /dev/null +++ b/package/network/config/dsaconfig/Makefile @@ -0,0 +1,40 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=dsaconfig +PKG_RELEASE:=1 +PKG_LICENSE:=GPL-2.0 + +include $(INCLUDE_DIR)/package.mk + +define Package/dsaconfig + SECTION:=net + CATEGORY:=Network + MAINTAINER:=Jo-Philipp Wich <jo@mein.io> + TITLE:=UCI configuration support for DSA switch VLAN filtering + DEPENDS:= +ip-bridge +ip-full + PKGARCH:=all +endef + +define Package/dsaconfig/description + This package provides UCI configuration abstraction for VLAN filter rules + on top of DSA switches. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/dsaconfig/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/dsaconfig.hotplug $(1)/etc/hotplug.d/iface/01-dsaconfig + + $(INSTALL_DIR) $(1)/lib/network + $(INSTALL_DATA) ./files/dsaconfig.include $(1)/lib/network/dsaconfig.sh + + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) ./files/dsaconfig.sh $(1)/sbin/dsaconfig +endef + +$(eval $(call BuildPackage,dsaconfig)) |