Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-ebtables-limit-arp
  3. PKG_VERSION:=1
  4. PKG_RELEASE:=1
  5. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  6. include ../gluon.mk
  7. define Package/gluon-ebtables-limit-arp
  8. SECTION:=gluon
  9. CATEGORY:=Gluon
  10. TITLE:=Ebtables limiter for ARP packets
  11. DEPENDS:=+gluon-core +gluon-ebtables gluon-mesh-batman-adv
  12. endef
  13. define Package/gluon-ebtables-limit-arp/description
  14. Gluon community wifi mesh firmware framework: Ebtables rules to
  15. rate-limit ARP packets.
  16. This package adds filters to limit the amount of ARP Requests
  17. devices are allowed to send into the mesh. The limits are 6 packets
  18. per minute per client device, by MAC address, and 1 per second per
  19. node in total.
  20. A burst of up to 50 ARP Requests is allowed until the rate-limiting
  21. takes effect (see --limit-burst in the ebtables manpage).
  22. Furthermore, ARP Requests with a target IP already present in the
  23. batman-adv DAT Cache are excluded from the rate-limiting,
  24. both regarding counting and filtering, as batman-adv will respond
  25. locally with no burden for the mesh. Therefore, this limiter
  26. should not affect popular target IPs, like gateways.
  27. However it should mitigate the problem of curious people or
  28. smart devices scanning the whole IP range. Which could create
  29. a significant amount of overhead for all participants so far.
  30. endef
  31. define Build/Prepare
  32. mkdir -p $(PKG_BUILD_DIR)
  33. $(CP) ./src/* $(PKG_BUILD_DIR)/
  34. endef
  35. define Build/Configure
  36. endef
  37. define Build/Compile
  38. $(call Build/Compile/Default)
  39. endef
  40. define Package/gluon-ebtables-limit-arp/install
  41. mkdir -p $(1)/usr/sbin/
  42. $(CP) $(PKG_BUILD_DIR)/gluon-arp-limiter $(1)/usr/sbin/gluon-arp-limiter
  43. $(CP) ./files/* $(1)/
  44. endef
  45. $(eval $(call BuildPackage,gluon-ebtables-limit-arp))