diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2013-05-24 17:58:42 +0000 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2013-05-24 17:58:42 +0000 |
commit | 3889f943adbb360272320c5e2211503c3a9cfd30 (patch) | |
tree | 54aa7c229fa599896c43526e6ce89a9d3523ff7d /dns | |
parent | d8ea548eea0562d16383c1c2a40b8485a341219b (diff) | |
download | ports-3889f943adbb360272320c5e2211503c3a9cfd30.tar.gz ports-3889f943adbb360272320c5e2211503c3a9cfd30.zip |
Notes
Diffstat (limited to 'dns')
-rw-r--r-- | dns/dualserver/Makefile | 2 | ||||
-rw-r--r-- | dns/dualserver/distinfo | 4 | ||||
-rw-r--r-- | dns/dualserver/files/patch-dualserverd.cpp | 56 | ||||
-rw-r--r-- | dns/dualserver/files/patch-dualserverd.h | 14 |
4 files changed, 33 insertions, 43 deletions
diff --git a/dns/dualserver/Makefile b/dns/dualserver/Makefile index 7b5285000872..d74863fde934 100644 --- a/dns/dualserver/Makefile +++ b/dns/dualserver/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dualserver -PORTVERSION= 7.01 +PORTVERSION= 7.02 CATEGORIES= dns net MASTER_SITES= SF/dhcp-dns-server/Dual%20DHCP%20DNS%20Server/ \ http://rodrigo.osorio.free.fr/freebsd/distfiles/ diff --git a/dns/dualserver/distinfo b/dns/dualserver/distinfo index a5e2601af589..71a0c0719a8b 100644 --- a/dns/dualserver/distinfo +++ b/dns/dualserver/distinfo @@ -1,2 +1,2 @@ -SHA256 (dualserverV7.01.tar.gz) = 8e074eb0f97ed5ce60d3f9227633339678619b70f7b4e5c85702de13650441db -SIZE (dualserverV7.01.tar.gz) = 137779 +SHA256 (dualserverV7.02.tar.gz) = 9d828a7d72810ed2a42a4949413fa3ac60c753e58b4d0569327cad3b7bf1e716 +SIZE (dualserverV7.02.tar.gz) = 138876 diff --git a/dns/dualserver/files/patch-dualserverd.cpp b/dns/dualserver/files/patch-dualserverd.cpp index 9d1c737bcebc..9993b82d07cb 100644 --- a/dns/dualserver/files/patch-dualserverd.cpp +++ b/dns/dualserver/files/patch-dualserverd.cpp @@ -1,5 +1,5 @@ ---- dualserverd.cpp 2013-04-21 04:24:14.000000000 +0200 -+++ dualserverd.cpp 2013-04-27 18:44:05.000000000 +0200 +--- dualserverd.cpp 2013-05-12 01:36:36.000000000 +0200 ++++ dualserverd.cpp 2013-05-18 16:54:53.000000000 +0200 @@ -22,10 +22,16 @@ #include <math.h> #include <sys/types.h> @@ -28,18 +28,18 @@ #include "dualserverd.h" @@ -88,7 +97,11 @@ - //const char send200[] = "HTTP/1.1 200 OK\r\nDate: %s\r\nLast-Modified: %s\r\nContent-Type: text/html\r\nConnection: Close\r\nTransfer-Encoding: chunked\r\n"; - const char line200[] = "<td>%s</td>"; - const char send403[] = "HTTP/1.1 403 Forbidden\r\n\r\n<h1>Forbidden</h1>"; + const char send403[] = "HTTP/1.1 403 Forbidden\r\n\r\n<h1>403 Forbidden</h1>"; + const char send404[] = "HTTP/1.1 404 Not Found\r\n\r\n<h1>404 Not Found</h1>"; + const char td200[] = "<td>%s</td>"; +#ifdef __FreeBSD__ -+const char sVersion[] = "Dual DHCP DNS Server Version 6.94 for FreeBSD"; ++const char sVersion[] = "Dual DHCP DNS Server Version 7.02 for FreeBSD Build 7019"; +#else - const char sVersion[] = "Dual DHCP DNS Server Version 7.01 Linux Build 7018"; + const char sVersion[] = "Dual DHCP DNS Server Version 7.02 Linux Build 7019"; +#endif + //const char toprow[] = "<body bgcolor=\"#cccccc\"><table width=\"800\"><tr><td align=\"center\"><font size=\"5\"><b>%s</b></font></b></b></td></tr><tr><td align=\"right\"><a target=\"_new\" href=\"http://dhcp-dns-server.sourceforge.net/\">http://dhcp-dns-server.sourceforge.net/</b></b></td></tr></table>"; const char toprow[] = "<body bgcolor=\"#cccccc\"><table width=640><tr><td align=\"center\"><font size=\"5\"><b>%s</b></font></td></tr><tr><td align=\"right\"><a target=\"_new\" href=\"http://dhcp-dns-server.sourceforge.net\">http://dhcp-dns-server.sourceforge.net</td></tr></table>"; const data4 opData[] = - { -@@ -266,7 +279,11 @@ +@@ -281,7 +294,11 @@ strcpy(leaFile, "/tmp/dualserver.state"); if (!iniFile[0]) @@ -51,45 +51,43 @@ strcpy(filePATH, iniFile); -@@ -4121,7 +4138,13 @@ +@@ -4268,7 +4285,12 @@ else if (req->dhcpp.header.bp_broadcast || !req->remote.sin_addr.s_addr || req->reqIP) { req->remote.sin_port = htons(IPPORT_DHCPC); +#ifdef __FreeBSD__ -+ req->remote.sin_addr.s_addr = network.dhcpConn[req->sockInd].addr.sin_addr.s_addr | -+ (~network.dhcpConn[req->sockInd].mask); -+ //printf("broadcast dhcp response to %s\n",inet_ntoa(req->remote.sin_addr)); ++ req->remote.sin_addr.s_addr = network.dhcpConn[req->sockInd].addr.sin_addr.s_addr | (~network.dhcpConn[req->sockInd].mask); ++ //printf("broadcast dhcp response to %s\n",inet_ntoa(req->remote.sin_addr)); +#else req->remote.sin_addr.s_addr = INADDR_BROADCAST; +#endif } else { -@@ -9371,6 +9394,11 @@ +@@ -9455,6 +9477,10 @@ newNetwork.dhcpConn[i].broadCastSize = sizeof(newNetwork.dhcpConn[i].broadCastVal); setsockopt(newNetwork.dhcpConn[i].sock, SOL_SOCKET, SO_BROADCAST, (char*)&newNetwork.dhcpConn[i].broadCastVal, newNetwork.dhcpConn[i].broadCastSize); -+ +#ifdef __FreeBSD__ -+ // See man ip -+ setsockopt(newNetwork.dhcpConn[i].sock,IPPROTO_IP, IP_ONESBCAST,(char*)&newNetwork.dhcpConn[i].broadCastVal, newNetwork.dhcpConn[i].broadCastSize); ++ // See man ip ++ setsockopt(newNetwork.dhcpConn[i].sock,IPPROTO_IP, IP_ONESBCAST,(char*)&newNetwork.dhcpConn[i].broadCastVal, newNetwork.dhcpConn[i].broadCastSize); +#endif int nRet = bind(newNetwork.dhcpConn[i].sock, (sockaddr*)&newNetwork.dhcpConn[i].addr, sizeof(struct sockaddr_in)); if (nRet == SOCKET_ERROR) -@@ -9422,7 +9450,11 @@ +@@ -9506,7 +9532,11 @@ setsockopt(newNetwork.dhcpListener.sock, SOL_SOCKET, SO_REUSEADDR, (char*)&newNetwork.dhcpListener.reUseVal, newNetwork.dhcpListener.reUseSize); newNetwork.dhcpListener.pktinfoVal = true; newNetwork.dhcpListener.pktinfoSize = sizeof(newNetwork.dhcpListener.pktinfoVal); +#ifdef __FreeBSD__ -+ setsockopt(newNetwork.dhcpListener.sock, IPPROTO_IP, IP_RECVIF, &newNetwork.dhcpListener.pktinfoVal, newNetwork.dhcpListener.pktinfoSize); ++ setsockopt(newNetwork.dhcpListener.sock, IPPROTO_IP, IP_RECVIF, &newNetwork.dhcpListener.pktinfoVal, newNetwork.dhcpListener.pktinfoSize); +#else setsockopt(newNetwork.dhcpListener.sock, IPPROTO_IP, IP_PKTINFO, &newNetwork.dhcpListener.pktinfoVal, newNetwork.dhcpListener.pktinfoSize); +#endif newNetwork.dhcpListener.addr.sin_family = AF_INET; newNetwork.dhcpListener.addr.sin_addr.s_addr = INADDR_ANY; -@@ -10064,6 +10096,12 @@ +@@ -10149,6 +10179,12 @@ MYWORD gdmess(data9 *req, MYBYTE sockInd) { @@ -100,9 +98,9 @@ + struct ifaddrs *ifap, *ifa; +#endif //sprintf(logBuff, "Socket=%u", sockInd); - //logDHCPMess(logBuff, 1); + //logMess(logBuff, 1); memset(req, 0, sizeof(data9)); -@@ -10079,7 +10117,11 @@ +@@ -10164,7 +10200,11 @@ req->msg.msg_name = &req->remote; req->msg.msg_namelen = sizeof(sockaddr_in); req->msg.msg_control = &req->msgcontrol; @@ -114,7 +112,7 @@ req->msg.msg_flags = msgflags; int flags = 0; -@@ -10088,6 +10130,45 @@ +@@ -10173,6 +10213,45 @@ if (errno || req->bytes <= 0) return 0; @@ -155,20 +153,12 @@ + + //printf("IF = %s\n", isdl->sdl_data); + //printf("RADDR = %s\n", inet_ntoa(isin->sin_addr)); -+ ++ +#else //printf("%u\n", req->msg.msg_controllen); //msgcontrol = (msg_control*)msg.msg_control; -@@ -10101,7 +10182,6 @@ - //printf("LADDR = %s\n", inet_ntoa(req->msgcontrol.pktinfo.ipi_addr)); - //printf("RADDR = %s\n", inet_ntoa(req->msgcontrol. pktinfo.ipi_spec_dst)); - -- - MYDWORD addr = req->msgcontrol.pktinfo.ipi_spec_dst.s_addr; - - //printf("%s\n",IP2String(tempbuff, addr)); -@@ -10119,6 +10199,7 @@ +@@ -10204,6 +10283,7 @@ break; } } diff --git a/dns/dualserver/files/patch-dualserverd.h b/dns/dualserver/files/patch-dualserverd.h index a21aa1ef93dc..6da1879f055c 100644 --- a/dns/dualserver/files/patch-dualserverd.h +++ b/dns/dualserver/files/patch-dualserverd.h @@ -1,6 +1,6 @@ ---- dualserverd.h 2013-04-21 03:13:15.000000000 +0200 -+++ dualserverd.h 2013-04-27 18:55:24.000000000 +0200 -@@ -614,10 +614,19 @@ +--- dualserverd.h 2013-05-06 19:27:45.000000000 +0200 ++++ dualserverd.h 2013-05-18 16:36:54.000000000 +0200 +@@ -623,10 +623,19 @@ struct msg_control { @@ -12,20 +12,20 @@ int cmsg_level; int cmsg_type; +#ifdef __FreeBSD__ -+ // Arbitrary size, when the size is required we use sizeof -+ unsigned char pktinfo[100]; ++ // Arbitrary size, when the size is required we use sizeof ++ unsigned char pktinfo[100]; +#else in_pktinfo pktinfo; +#endif }; #if defined(__hppa__) || \ -@@ -735,7 +744,11 @@ +@@ -744,7 +753,11 @@ union { int broadCastVal; +#ifdef __FreeBSD__ -+ int pktinfoVal; ++ int pktinfoVal; +#else bool pktinfoVal; +#endif |