packages/net/bcp38/Makefile
Dave Taht e5910b9834 bcp38: Allow class-e through bcp38
It is increasingly likely 240/4 and 0/8 netblocks will be allocated as
unicast globally rout-able and reachable address space
240/4 is already enabled throughout linux and openwrt.

Permit these address blocks under bcp38 address validation, ie. remove
those ranges from the block list:

list match '0.0.0.0/8'       # RFC 1700
list match '240.0.0.0/4'     # RFC 5745

Signed-off-by: Dave Taht <dave.taht@gmail.com>
[bump package - minor tweaks to commit message - remove commented lines]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2019-02-03 15:38:32 +00:00

68 lines
1.5 KiB
Makefile

#
# Copyright (C) 2014 Openwrt.org
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=bcp38
PKG_VERSION:=5
PKG_RELEASE:=5
PKG_LICENCE:=GPL-3.0+
include $(INCLUDE_DIR)/package.mk
define Package/bcp38
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
TITLE:=BCP38 compliance
URL:=https://github.com/dtaht/ceropackages-3.10
MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
DEPENDS:=+ipset
endef
define Package/bcp38/description
bcp38 implements IETF BCP38 for home routers.
See https://tools.ietf.org/html/bcp38.
This package provides BCP38 for IPv4 only - IPv6 uses source
specific default routes, so no firewall configuration is needed.
endef
define Package/bcp38/conffiles
/etc/config/bcp38
endef
define Build/Prepare
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/bcp38/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
$(INSTALL_DIR) $(1)/usr/lib/bcp38
$(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/bcp38.init $(1)/etc/init.d/bcp38
endef
define Package/bcp38/postinst
#!/bin/sh
[ -x /etc/uci-defaults/bcp38 ] && /etc/uci-defaults/bcp38 || exit 0
endef
define Package/bcp38/postrm
#!/bin/sh
uci delete firewall.bcp38
uci commit
endef
$(eval $(call BuildPackage,bcp38))