Update to 2.1
PR: 98419 Submitted by: miwi, with fixes from maintainer Approved by: maintainer
This commit is contained in:
parent
83a7fe8551
commit
2c591e59cf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=164476
3 changed files with 42 additions and 49 deletions
|
@ -4,7 +4,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dualserver
|
||||
PORTVERSION= 2.0
|
||||
PORTVERSION= 2.1
|
||||
CATEGORIES= dns net
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= dhcp-dns-server
|
||||
|
@ -13,6 +13,7 @@ DISTNAME= ${PORTNAME}V${PORTVERSION}
|
|||
MAINTAINER= gkovesdan@t-hosting.hu
|
||||
COMMENT= Combined DHCP/DNS server for small LANs
|
||||
|
||||
USE_DOS2UNIX= yes
|
||||
USE_RC_SUBR= dualserver.sh
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
PLIST_FILES= sbin/dualserver etc/dualserver.conf.sample
|
||||
|
@ -25,7 +26,6 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-dualserver.h \
|
|||
.endif
|
||||
|
||||
pre-patch:
|
||||
${REINPLACE_CMD} 's/[[:cntrl:]]*$$//' ${WRKSRC}/*
|
||||
${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
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (dualserverV2.0.tar.gz) = de37780d54f0b462e7bfc84503049605
|
||||
SHA256 (dualserverV2.0.tar.gz) = c6f96cbc1782cbd0813e1af10ebeba5949232369187a981d1a7a939dcd01154d
|
||||
SIZE (dualserverV2.0.tar.gz) = 49200
|
||||
MD5 (dualserverV2.1.tar.gz) = e560a4f9e2783b8573a91a23bbb23318
|
||||
SHA256 (dualserverV2.1.tar.gz) = 1538bb43afcce7779c49b0c2d1a4e75ae98d3b888c6d0c800e1a9ca001e53082
|
||||
SIZE (dualserverV2.1.tar.gz) = 53815
|
||||
|
|
|
@ -1,66 +1,59 @@
|
|||
--- dualserver.cpp.orig Sun Apr 30 15:32:37 2006
|
||||
+++ dualserver.cpp Sun Apr 30 15:36:39 2006
|
||||
@@ -463,8 +463,8 @@
|
||||
--- dualserver.cpp.orig Mon Jun 5 16:08:44 2006
|
||||
+++ dualserver.cpp Mon Jun 5 16:09:14 2006
|
||||
@@ -501,15 +501,15 @@
|
||||
if (!req->rtype)
|
||||
{
|
||||
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])
|
||||
@@ -478,8 +478,8 @@
|
||||
req->dnsp.header.adcount = 0;
|
||||
+ req->dnsp.header.flags.rcode = 3;
|
||||
+ req->dnsp.header.flags.ra = 0;
|
||||
}
|
||||
|
||||
req->dnsp.header.nscount = 0;
|
||||
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;
|
||||
|
||||
-
|
||||
+ req->dnsp.header.flags.qr = 1;
|
||||
+ req->dnsp.header.flags.aa = 1;
|
||||
+
|
||||
char *raw = req->dnsp.data;
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
if (!cfig->dns[0])
|
||||
getdnserv(cfig);
|
||||
for (int i = 1; i <= ntohs(req->dnsp.header.qdcount); i++)
|
||||
@@ -701,7 +701,7 @@
|
||||
time_t currentTime = time(NULL);
|
||||
req->lease = cfig->lease;
|
||||
|
||||
- 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)
|
||||
+ if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.flags.opcode) == 0)
|
||||
{
|
||||
char *raw = req->dnsp.data;
|
||||
fQu(req->query, &req->dnsp, raw);
|
||||
@@ -853,7 +853,7 @@
|
||||
|
||||
WORD fdnmess(data5 *req, data2 *cfig)
|
||||
{
|
||||
- if (!req->dnsp.header.rd)
|
||||
+ if (!req->dnsp.header.flags.rd)
|
||||
return 0;
|
||||
|
||||
if (!cfig->dns[0])
|
||||
@@ -923,10 +923,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;
|
||||
char *dp = req->dnsp.data;
|
||||
dp += pQu(dp, req->query);
|
||||
dp += pShort(dp, DNS_TYPE_A);
|
||||
@@ -1106,7 +1106,7 @@
|
||||
raw += fQu(req->query, &req->dnsp, raw);
|
||||
@@ -721,7 +721,7 @@
|
||||
{
|
||||
if (!checkLocal(req, cfig))
|
||||
{
|
||||
- if (!req->dnsp.header.rd)
|
||||
+ if (!req->dnsp.header.flags.rd)
|
||||
return genMess(req, cfig);
|
||||
else
|
||||
return 0;
|
||||
@@ -1127,7 +1127,7 @@
|
||||
if (!found)
|
||||
req->bytes = 0;
|
||||
|
||||
- req->dnsp.header.aa = 0;
|
||||
+ req->dnsp.header.flags.aa = 0;
|
||||
+ req->dnsp.header.flags.aa = 0;
|
||||
return req->bytes;
|
||||
}
|
||||
|
||||
@@ -2216,7 +2216,7 @@
|
||||
|
||||
mess.header.xid = 6;
|
||||
mess.header.qdcount = htons(1);
|
||||
- mess.header.rd = 1;
|
||||
+ mess.header.flags.rd = 1;
|
||||
char *raw = mess.data;
|
||||
raw += pQu(raw, "1.0.0.127.in-addr.arpa");
|
||||
raw += pShort(raw, DNS_TYPE_PTR);
|
||||
|
|
Loading…
Reference in a new issue