2017-04-29 21:52:41 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=gluon-ebtables-limit-arp
|
|
|
|
PKG_VERSION:=1
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
include ../gluon.mk
|
|
|
|
|
|
|
|
define Package/gluon-ebtables-limit-arp
|
|
|
|
TITLE:=Ebtables limiter for ARP packets
|
2018-04-11 11:14:00 +00:00
|
|
|
DEPENDS:=+gluon-core +gluon-ebtables gluon-mesh-batman-adv \
|
|
|
|
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_LIMIT \
|
|
|
|
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_MARK \
|
|
|
|
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_MARK_T
|
2017-04-29 21:52:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/gluon-ebtables-limit-arp/description
|
|
|
|
Gluon community wifi mesh firmware framework: Ebtables rules to
|
|
|
|
rate-limit ARP packets.
|
|
|
|
|
|
|
|
This package adds filters to limit the amount of ARP Requests
|
|
|
|
devices are allowed to send into the mesh. The limits are 6 packets
|
|
|
|
per minute per client device, by MAC address, and 1 per second per
|
|
|
|
node in total.
|
|
|
|
|
|
|
|
A burst of up to 50 ARP Requests is allowed until the rate-limiting
|
|
|
|
takes effect (see --limit-burst in the ebtables manpage).
|
|
|
|
|
|
|
|
Furthermore, ARP Requests with a target IP already present in the
|
|
|
|
batman-adv DAT Cache are excluded from the rate-limiting,
|
|
|
|
both regarding counting and filtering, as batman-adv will respond
|
|
|
|
locally with no burden for the mesh. Therefore, this limiter
|
|
|
|
should not affect popular target IPs, like gateways.
|
|
|
|
|
|
|
|
However it should mitigate the problem of curious people or
|
|
|
|
smart devices scanning the whole IP range. Which could create
|
|
|
|
a significant amount of overhead for all participants so far.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/gluon-ebtables-limit-arp/install
|
2018-03-08 18:49:41 +00:00
|
|
|
$(Gluon/Build/Install)
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
2017-04-29 21:52:41 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/gluon-arp-limiter $(1)/usr/sbin/gluon-arp-limiter
|
|
|
|
endef
|
|
|
|
|
2018-03-08 18:49:41 +00:00
|
|
|
$(eval $(call BuildPackageGluon,gluon-ebtables-limit-arp))
|