blob: 0b174a84f52b9513fb708012d19385106f5b0934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# SPDX-License-Identifier: GPL-2.0-only
include $(TOPDIR)/rules.mk
PKG_NAME:=tcfilter
PKG_VERSION:=1.0
PKG_RELEASE:=1
PKG_MAINTAINER:=Mark Abe <github@mab.wien>
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=
include $(INCLUDE_DIR)/package.mk
define Package/tcfilter
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=Persistent tc ingress filters (UCI-managed)
DEPENDS:=+tc-full +kmod-sched-flower
PKGARCH:=all
endef
define Package/tcfilter/description
Thin UCI front-end that installs raw "tc filter ... ingress" expressions on
network devices at boot and on interface up, and removes them on stop. The
match/action part is entered verbatim as tc syntax; the package only manages
the device, the preference number, enable/disable and persistence.
Intended for driving hardware tc-flower offload (e.g. the Realtek DSA PIE
offload) where no higher-level configuration layer exists.
endef
define Package/tcfilter/conffiles
/etc/config/tcfilter
endef
define Build/Compile
endef
define Package/tcfilter/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/tcfilter.config $(1)/etc/config/tcfilter
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tcfilter.init $(1)/etc/init.d/tcfilter
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DATA) ./files/tcfilter.hotplug-iface $(1)/etc/hotplug.d/iface/30-tcfilter
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
$(INSTALL_DATA) ./files/tcfilter.hotplug-net $(1)/etc/hotplug.d/net/30-tcfilter
endef
$(eval $(call BuildPackage,tcfilter))
|