diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/dhcprelay/Makefile | 26 | ||||
-rw-r--r-- | net/dhcprelay/distinfo | 3 | ||||
-rw-r--r-- | net/dhcprelay/files/dhcprelay.sh.in | 36 | ||||
-rw-r--r-- | net/dhcprelay/files/patch-Makefile | 15 | ||||
-rw-r--r-- | net/dhcprelay/pkg-descr | 29 |
6 files changed, 110 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 32346da..29ee9bf 100644 --- a/net/Makefile +++ b/net/Makefile @@ -107,6 +107,7 @@ SUBDIR += dhcp6 SUBDIR += dhcpdump SUBDIR += dhcping + SUBDIR += dhcprelay SUBDIR += dictd SUBDIR += dictd-database SUBDIR += diradmin diff --git a/net/dhcprelay/Makefile b/net/dhcprelay/Makefile new file mode 100644 index 0000000..231cb1c --- /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 0000000..f79b4c4 --- /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 0000000..d58f30f --- /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 0000000..386be9f --- /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 0000000..653e391 --- /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> |