aboutsummaryrefslogtreecommitdiff
path: root/net/dhcprelay
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-11-15 11:26:44 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-11-15 11:26:44 +0000
commitaba6b27e0f0717eca38a4ed550ba1f0e6dbb3f10 (patch)
treef25c02e0f2ddd6438cfa23d77f870f14815c006a /net/dhcprelay
parenta168a326aac362e274efbdddcecc978d5d125242 (diff)
downloadports-aba6b27e0f0717eca38a4ed550ba1f0e6dbb3f10.tar.gz
ports-aba6b27e0f0717eca38a4ed550ba1f0e6dbb3f10.zip
Notes
Diffstat (limited to 'net/dhcprelay')
-rw-r--r--net/dhcprelay/Makefile26
-rw-r--r--net/dhcprelay/distinfo3
-rw-r--r--net/dhcprelay/files/dhcprelay.sh.in36
-rw-r--r--net/dhcprelay/files/patch-Makefile15
-rw-r--r--net/dhcprelay/pkg-descr29
5 files changed, 109 insertions, 0 deletions
diff --git a/net/dhcprelay/Makefile b/net/dhcprelay/Makefile
new file mode 100644
index 000000000000..231cb1c291c4
--- /dev/null
+++ b/net/dhcprelay/Makefile
@@ -0,0 +1,26 @@
+# New ports collection makefile for: dhcprelay
+# Date created: 15 November 2005
+# Whom: Edwin Groothuis (edwin@mavetju.org)
+#
+# $FreeBSD$
+#
+
+PORTNAME= dhcprelay
+PORTVERSION= 1.0
+CATEGORIES= net
+MASTER_SITES= http://www.mavetju.org/download/
+
+MAINTAINER= edwin@mavetju.org
+COMMENT= Light weight DHCP Relay Agent with GIF tunnel support
+
+LIB_DEPENDS= dnet.1:${PORTSDIR}/net/libdnet
+
+PLIST_FILES= bin/dhcprelay etc/rc.d/dhcprelay.sh
+USE_RC_SUBR= yes
+SUB_FILES= dhcprelay.sh
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/dhcprelay ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKDIR}/dhcprelay.sh ${PREFIX}/etc/rc.d
+
+.include <bsd.port.mk>
diff --git a/net/dhcprelay/distinfo b/net/dhcprelay/distinfo
new file mode 100644
index 000000000000..f79b4c4fd7fb
--- /dev/null
+++ b/net/dhcprelay/distinfo
@@ -0,0 +1,3 @@
+MD5 (dhcprelay-1.0.tar.gz) = 576a4c5eb94b31b3b47cb022c14c30a7
+SHA256 (dhcprelay-1.0.tar.gz) = de550760b6a36cf205ca8138e22867c5ccb1c220ebb20acb79205a2ac8d9f9f3
+SIZE (dhcprelay-1.0.tar.gz) = 4771
diff --git a/net/dhcprelay/files/dhcprelay.sh.in b/net/dhcprelay/files/dhcprelay.sh.in
new file mode 100644
index 000000000000..d58f30f06bdf
--- /dev/null
+++ b/net/dhcprelay/files/dhcprelay.sh.in
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/net/dhcprelay/files/Attic/dhcprelay.sh.in,v 1.1 2005-11-15 11:26:44 edwin Exp $
+#
+# PROVIDE: dhcprelay
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following line to /etc/rc.conf to enable dhcrelay:
+#
+# dhcprelay_enable="YES"
+#
+
+# override these variables in /etc/rc.conf
+dhcprelay_enable=${dhcprelay_enable:-"NO"}
+dhcprelay_server=${dhcprelay_server:-} # dhcprelay server(s)
+dhcprelay_ifaces=${dhcprelay_ifaces:-} # ethernet interface(s)
+
+dhcprelay_precmd ()
+{
+ rc_flags="${rc_flags} ${dhcprelay_ifaces} ${dhcprelay_servers}"
+}
+
+. %%RC_SUBR%%
+
+name=dhcprelay
+rcvar=$(set_rcvar)
+pidfile=/var/run/${name}.pid
+command=/usr/local/bin/${name}
+
+start_precmd=${name}_precmd
+
+echo $rc_flags
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/net/dhcprelay/files/patch-Makefile b/net/dhcprelay/files/patch-Makefile
new file mode 100644
index 000000000000..386be9f2f16b
--- /dev/null
+++ b/net/dhcprelay/files/patch-Makefile
@@ -0,0 +1,15 @@
+--- Makefile.orig Tue Nov 15 18:25:30 2005
++++ Makefile Tue Nov 15 18:25:59 2005
+@@ -1,8 +1,10 @@
++all: dhcprelay
++
+ dhcprelay: dhcprelay.o
+- gcc -g -o $@ -Wall -L/usr/local/lib -lpcap -ldnet $>
++ gcc -g -o $@ -Wall -L${LOCALBASE}/lib -lpcap -ldnet $>
+
+ dhcprelay.o: dhcprelay.c
+- gcc -g -c -o $@ -Wall -I/usr/local/include $<
++ gcc -g -c -o $@ -Wall -I${LOCALBASE}/include $<
+
+ clean:
+ rm -f dhcprelay.o dhcprelay dhcprelay.core
diff --git a/net/dhcprelay/pkg-descr b/net/dhcprelay/pkg-descr
new file mode 100644
index 000000000000..653e39194a82
--- /dev/null
+++ b/net/dhcprelay/pkg-descr
@@ -0,0 +1,29 @@
+A light-weight DHCP Relay Agent.
+
+Why not the ISC DHCP Relay Agent?
+
+- If your RA has multiple interfaces, you get multiple requests for
+ each request:
+
+ DHCPREQUEST for 10.199.14.216 from 00:10:dc:d1:e6:39 (foo) via 10.199.14.1
+ DHCPACK on 10.199.14.216 to 00:10:dc:d1:e6:39 (foo) via 10.199.14.1
+ DHCPREQUEST for 10.199.14.216 from 00:10:dc:d1:e6:39 (foo) via 10.10.3.5: wrong network.
+ DHCPNAK on 10.199.14.216 to 00:10:dc:d1:e6:39 via 10.10.3.5
+
+ This RA sends only one request, coming with the IP address of the
+ LAN the request came from.
+
+- If your RA has multiple interfaces, the outgoing interfaces to
+ the WAN needs to be active in the DHCP relay otherwise answers
+ are not picked up.
+
+ This RA uses a unicast socket for returning answers.
+
+- If your RA has non-ethernet interfaces (GIF-tunnels for example,
+ which VPN back to the central network), the answers are not picked
+ up by the RA.
+
+ This RA does use a unicast socket for returning answers.
+
+WWW: http://www.mavetju.org/networking/
+Author: Edwin Groothuis <edwin@mavetju.org>