2 # Copyright (C) 2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=dhcp-forwarder
14 PKG_SOURCE_URL
:=@SAVANNAH
/dhcp-fwd
/
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_MD5SUM
:=9d1ea7939fef93ae7d7caef43397a908
19 PKG_LICENSE_FILES
:=COPYING
21 PKG_MAINTAINER
:=Scott K Logan
<logans@cottsay.net
>
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/dhcp-forwarder
31 SUBMENU
:=IP Addresses and Names
32 TITLE
:=DHCP relay agent
33 URL
:=http
://www.nongnu.org
/dhcp-fwd
/
34 USERID
:=dhcp-fwd
=375:dhcp-fwd
=375
37 define Package
/dhcp-forwarder
/description
38 This program forwards DHCP messages between subnets with different sublayer
39 broadcast domains. It is similarly to the DHCP relay agent dhcrelay of ISC
's
40 DHCP, but has the following features which are important for me:
42 - Runs as non-root in a chroot-jail
43 - Uses "normal" AF_INET sockets; this allows to uses packetfilters to filter
45 - The DHCP agent IDs can be defined freely
46 - Has a small memory footprint when using dietlibc
48 It tries to be RFC 2131/2132 and 3046 compliant. Probably it works with BOOTP
49 (RFC 951) also, but since the handling of the giaddr field is described
50 misleading (see RFC 1542), there may occur problems.
53 define Package/dhcp-forwarder/conffiles
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 DESTDIR="$(PKG_INSTALL_DIR)" \
63 cfg_filename="/etc/dhcp-fwd.conf" \
67 define Package/dhcp-forwarder/install
68 $(INSTALL_DIR) $(1)/usr/bin $(1)/etc $(1)/etc/init.d
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(1)/usr/bin/
70 $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(1)/etc/
71 $(INSTALL_BIN) ./files/dhcp-fwd.init $(1)/etc/init.d/dhcp-fwd
74 $(eval $(call BuildPackage,dhcp-forwarder))