summaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
Diffstat (limited to 'dns')
-rw-r--r--dns/Makefile1
-rw-r--r--dns/dualserver/Makefile42
-rw-r--r--dns/dualserver/distinfo3
-rw-r--r--dns/dualserver/files/dualserver.sh.in27
-rw-r--r--dns/dualserver/files/extra-patch-dualserver.cpp66
-rw-r--r--dns/dualserver/files/extra-patch-dualserver.h11
-rw-r--r--dns/dualserver/pkg-descr6
7 files changed, 156 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile
index 3e5c924..5afa8af 100644
--- a/dns/Makefile
+++ b/dns/Makefile
@@ -35,6 +35,7 @@
SUBDIR += doc
SUBDIR += domtools
SUBDIR += drill
+ SUBDIR += dualserver
SUBDIR += ez-ipupdate
SUBDIR += fastresolve
SUBDIR += firedns
diff --git a/dns/dualserver/Makefile b/dns/dualserver/Makefile
new file mode 100644
index 0000000..afdebf4
--- /dev/null
+++ b/dns/dualserver/Makefile
@@ -0,0 +1,42 @@
+# Ports collection Makefile for: dualserver
+# Date created: 10 Dec 2005
+# Whom: Gabor Kovesdan
+# $FreeBSD$
+
+PORTNAME= dualserver
+PORTVERSION= 1.0
+CATEGORIES= dns net
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= dhcp-dns-server
+DISTNAME= ${PORTNAME}V${PORTVERSION}
+
+MAINTAINER= gkovesdan@t-hosting.hu
+COMMENT= Combined DHCP/DNS server for small LANs
+
+USE_REINPLACE= YES
+USE_RC_SUBR= dualserver.sh
+WRKSRC= ${WRKDIR}/${PORTNAME}
+PLIST_FILES= sbin/dualserver etc/dualserver.conf.sample
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dualserver.h \
+ ${FILESDIR}/extra-patch-dualserver.cpp
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.cpp
+ ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.h
+ ${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/dualserver.ini
+ ${REINPLACE_CMD} 's|/etc/dualserver.ini|${PREFIX}/etc/dualserver.conf|' ${WRKSRC}/dualserver.cpp
+ ${REINPLACE_CMD} 's|/etc/dualserver.state|/var/run/dualserver.state|' ${WRKSRC}/dualserver.cpp
+
+do-build:
+ ${CXX} -o ${WRKSRC}/dualserver ${WRKSRC}/dualserver.cpp
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/dualserver ${PREFIX}/sbin
+ ${INSTALL_DATA} ${WRKSRC}/dualserver.ini ${PREFIX}/etc/dualserver.conf.sample
+
+.include <bsd.port.post.mk>
diff --git a/dns/dualserver/distinfo b/dns/dualserver/distinfo
new file mode 100644
index 0000000..0065765
--- /dev/null
+++ b/dns/dualserver/distinfo
@@ -0,0 +1,3 @@
+MD5 (dualserverV1.0.tar.gz) = 279703af257c78a0f123cec194d8bdb8
+SHA256 (dualserverV1.0.tar.gz) = 37d0c6f8fd802bc94badae6b6043e3754ab5fa6781a271e8503457ca7d0faf8a
+SIZE (dualserverV1.0.tar.gz) = 39140
diff --git a/dns/dualserver/files/dualserver.sh.in b/dns/dualserver/files/dualserver.sh.in
new file mode 100644
index 0000000..619fdeb
--- /dev/null
+++ b/dns/dualserver/files/dualserver.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+
+# PROVIDE: dualserver
+# REQUIRE: SERVERS
+# BEFORE:
+# KEYWORD: FreeBSD shutdown
+
+. /etc/rc.subr
+
+name="dualserver"
+rcvar=`set_rcvar`
+start_cmd="dualserver_startcmd"
+stop_cmd="dualserver_stopcmd"
+
+dualserver_startcmd ()
+{
+%%PREFIX%%/sbin/dualserver
+}
+
+dualserver_stopcmd ()
+{
+killall dualserver
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/dns/dualserver/files/extra-patch-dualserver.cpp b/dns/dualserver/files/extra-patch-dualserver.cpp
new file mode 100644
index 0000000..2cedfe5
--- /dev/null
+++ b/dns/dualserver/files/extra-patch-dualserver.cpp
@@ -0,0 +1,66 @@
+--- dualserver.cpp.orig Mon Dec 12 10:41:03 2005
++++ dualserver.cpp Mon Dec 12 10:43:53 2005
+@@ -349,8 +349,8 @@
+ else
+ {
+ req->dnsp.header.ancount = 0;
+- req->dnsp.header.rcode = 3;
+- req->dnsp.header.ra = 0;
++ req->dnsp.header.flags.rcode = 3;
++ req->dnsp.header.flags.ra = 0;
+ }
+
+ if (cfig->servers[0])
+@@ -364,8 +364,8 @@
+ req->dnsp.header.adcount = 0;
+ }
+
+- req->dnsp.header.qr = 1;
+- req->dnsp.header.aa = 1;
++ req->dnsp.header.flags.qr = 1;
++ req->dnsp.header.flags.aa = 1;
+
+ char *raw = req->dnsp.data;
+
+@@ -495,7 +495,7 @@
+ if (!cfig->servers[0])
+ glocal(cfig);
+
+- if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.opcode) == 0)
++ if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.flags.opcode) == 0)
+ {
+ char *raw = req->dnsp.data;
+ strcpy(req->raw_query, raw);
+@@ -619,7 +619,7 @@
+
+ WORD fdnmess(data5 *req, data2 *cfig)
+ {
+- if (!req->dnsp.header.rd)
++ if (!req->dnsp.header.flags.rd)
+ return 0;
+
+ if (!cfig->dns[0])
+@@ -679,10 +679,10 @@
+ else
+ {
+ req->dnsp.header.ancount = 0;
+- req->dnsp.header.rcode = 3;
+- req->dnsp.header.ra = 0;
+- req->dnsp.header.qr = 1;
+- req->dnsp.header.aa = 0;
++ req->dnsp.header.flags.rcode = 3;
++ req->dnsp.header.flags.ra = 0;
++ req->dnsp.header.flags.qr = 1;
++ req->dnsp.header.flags.aa = 0;
+ req->BytesReady = req->BytesRecd;
+ return 0;
+ }
+@@ -754,7 +754,7 @@
+ if (!found)
+ req->BytesReady = 0;
+
+- req->dnsp.header.aa = 0;
++ req->dnsp.header.flags.aa = 0;
+ return req->BytesReady;
+ }
+
diff --git a/dns/dualserver/files/extra-patch-dualserver.h b/dns/dualserver/files/extra-patch-dualserver.h
new file mode 100644
index 0000000..e9b922f
--- /dev/null
+++ b/dns/dualserver/files/extra-patch-dualserver.h
@@ -0,0 +1,11 @@
+--- dualserver.h.orig Mon Dec 12 10:40:55 2005
++++ dualserver.h Mon Dec 12 10:41:23 2005
+@@ -94,7 +94,7 @@
+ BYTE rcode:4;
+ BYTE z:3;
+ BYTE ra:1;
+- };
++ } flags;
+ };
+ union {
+ WORD zcount;
diff --git a/dns/dualserver/pkg-descr b/dns/dualserver/pkg-descr
new file mode 100644
index 0000000..c21be9e
--- /dev/null
+++ b/dns/dualserver/pkg-descr
@@ -0,0 +1,6 @@
+Combined DHCP/DNS Server for Small LAN. Dynamic DHCP allocates/renew host
+addresses while Caching DNS Server first try resolving from DHCP alotted
+names then from Cache then only forwarding to External DNS Servers. Auto
+Config and auto Dynamic DNS update.
+
+WWW: http://sourceforge.net/projects/dhcp-dns-server/
OpenPOWER on IntegriCloud