Add net/dhcprelay, a DHCP Relay Agent.
See the pkg-descr for reasoning why I had to make this one. WWW: http://www.mavetju.org/networking/ Author: Edwin Groothuis <edwin@mavetju.org>
This commit is contained in:
parent
a168a326aa
commit
aba6b27e0f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148362
6 changed files with 110 additions and 0 deletions
|
@ -107,6 +107,7 @@
|
|||
SUBDIR += dhcp6
|
||||
SUBDIR += dhcpdump
|
||||
SUBDIR += dhcping
|
||||
SUBDIR += dhcprelay
|
||||
SUBDIR += dictd
|
||||
SUBDIR += dictd-database
|
||||
SUBDIR += diradmin
|
||||
|
|
26
net/dhcprelay/Makefile
Normal file
26
net/dhcprelay/Makefile
Normal file
|
@ -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>
|
3
net/dhcprelay/distinfo
Normal file
3
net/dhcprelay/distinfo
Normal file
|
@ -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
|
36
net/dhcprelay/files/dhcprelay.sh.in
Normal file
36
net/dhcprelay/files/dhcprelay.sh.in
Normal file
|
@ -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"
|
15
net/dhcprelay/files/patch-Makefile
Normal file
15
net/dhcprelay/files/patch-Makefile
Normal file
|
@ -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
|
29
net/dhcprelay/pkg-descr
Normal file
29
net/dhcprelay/pkg-descr
Normal file
|
@ -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>
|
Loading…
Reference in a new issue