Date: Sat, 27 Apr 2013 19:20:59 +0200 (CEST) From: Rodrigo (ros) OSORIO <rodrigo@bebik.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/178200: dns/dualserver port update to 7.01 Message-ID: <201304271720.r3RHKw6n005064@sisko.workgroup> Resent-Message-ID: <201304271730.r3RHU0m3024237@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 178200 >Category: ports >Synopsis: dns/dualserver port update to 7.01 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Apr 27 17:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Rodrigo (ros) OSORIO >Release: FreeBSD 9.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD sisko 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Update dualserver to 7.01 - Subnet Selection can now be manually configured - Target Relay Agent can be overridden - HTTP Interface can be restricted - new DHCP/DNS features >How-To-Repeat: >Fix: --- dualserver.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 316316) +++ Makefile (working copy) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= dualserver -PORTVERSION= 6.94 +PORTVERSION= 7.01 CATEGORIES= dns net MASTER_SITES= SF/dhcp-dns-server/Dual%20DHCP%20DNS%20Server/ DISTNAME= ${PORTNAME}V${PORTVERSION} Index: distinfo =================================================================== --- distinfo (revision 316316) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (dualserverV6.94.tar.gz) = 3007e6508eb95d06f3c8764951ff6d3276733409e2119f6299c9485060b9445c -SIZE (dualserverV6.94.tar.gz) = 796893 +SHA256 (dualserverV7.01.tar.gz) = 8e074eb0f97ed5ce60d3f9227633339678619b70f7b4e5c85702de13650441db +SIZE (dualserverV7.01.tar.gz) = 137779 Index: files/patch-dualserverd.cpp =================================================================== --- files/patch-dualserverd.cpp (revision 316316) +++ files/patch-dualserverd.cpp (working copy) @@ -1,5 +1,5 @@ ---- dualserverd.cpp 2012-11-09 17:02:36.000000000 +0100 -+++ dualserverd.cpp 2012-11-12 13:17:25.000000000 +0100 +--- dualserverd.cpp 2013-04-21 04:24:14.000000000 +0200 ++++ dualserverd.cpp 2013-04-27 18:44:05.000000000 +0200 @@ -22,10 +22,16 @@ #include <math.h> #include <sys/types.h> @@ -27,28 +27,31 @@ using namespace std; #include "dualserverd.h" -@@ -84,7 +93,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\nContent-Length: \r\n\r\n"; +@@ -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>"; +#ifdef __FreeBSD__ +const char sVersion[] = "Dual DHCP DNS Server Version 6.94 for FreeBSD"; +#else - const char sVersion[] = "Dual DHCP DNS Server Version 6.94 Linux Build 7011"; + const char sVersion[] = "Dual DHCP DNS Server Version 7.01 Linux Build 7018"; +#endif + 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[] = { - { "SubnetMask", DHCP_OPTION_NETMASK, 3 }, -@@ -261,7 +274,7 @@ +@@ -266,7 +279,11 @@ strcpy(leaFile, "/tmp/dualserver.state"); if (!iniFile[0]) -- strcpy(iniFile, "/etc/dualserver.ini"); ++#ifdef __FreeBSD__ + strcpy(iniFile, "/usr/local/etc/dualserver.conf"); ++#else + strcpy(iniFile, "/etc/dualserver.ini"); ++#endif - if (verbatim) - { -@@ -4002,7 +4015,13 @@ + strcpy(filePATH, iniFile); + +@@ -4121,7 +4138,13 @@ else if (req->dhcpp.header.bp_broadcast || !req->remote.sin_addr.s_addr || req->reqIP) { req->remote.sin_port = htons(IPPORT_DHCPC); @@ -59,13 +62,14 @@ +#else req->remote.sin_addr.s_addr = INADDR_BROADCAST; +#endif - req->dhcpp.header.bp_broadcast = 1; } else -@@ -8983,6 +9002,10 @@ + { +@@ -9371,6 +9394,11 @@ 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); @@ -73,7 +77,7 @@ int nRet = bind(newNetwork.dhcpConn[i].sock, (sockaddr*)&newNetwork.dhcpConn[i].addr, sizeof(struct sockaddr_in)); if (nRet == SOCKET_ERROR) -@@ -9034,7 +9057,11 @@ +@@ -9422,7 +9450,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); @@ -85,33 +89,20 @@ newNetwork.dhcpListener.addr.sin_family = AF_INET; newNetwork.dhcpListener.addr.sin_addr.s_addr = INADDR_ANY; -@@ -9496,8 +9523,11 @@ +@@ -10064,6 +10096,12 @@ - if (addr && !(flags & IFF_LOOPBACK)) - addServer(network->allServers, addr); -- -+#ifdef __FreeBSD__ -+ if (addr && mask && !(flags & IFF_POINTOPOINT) && !(flags & IFF_LOOPBACK)) -+#else - if (addr && mask && !(flags & IFF_POINTOPOINT) && !(flags & IFF_LOOPBACK) && !(flags & IFF_DYNAMIC)) -+#endif - { - if ((flags & IFF_RUNNING) && (flags & IFF_UP)) - { -@@ -9656,6 +9686,12 @@ - MYWORD gdmess(data9 *req, MYBYTE sockInd) { +#ifdef __FreeBSD__ -+ struct cmsghdr *cmsg; -+ struct sockaddr_dl * isdl; -+ struct sockaddr_in *isin; -+ struct ifaddrs *ifap, *ifa; ++ struct cmsghdr *cmsg; ++ struct sockaddr_dl * isdl; ++ struct sockaddr_in *isin; ++ struct ifaddrs *ifap, *ifa; +#endif //sprintf(logBuff, "Socket=%u", sockInd); //logDHCPMess(logBuff, 1); memset(req, 0, sizeof(data9)); -@@ -9671,7 +9707,11 @@ +@@ -10079,7 +10117,11 @@ req->msg.msg_name = &req->remote; req->msg.msg_namelen = sizeof(sockaddr_in); req->msg.msg_control = &req->msgcontrol; @@ -123,7 +114,7 @@ req->msg.msg_flags = msgflags; int flags = 0; -@@ -9680,6 +9720,45 @@ +@@ -10088,6 +10130,45 @@ if (errno || req->bytes <= 0) return 0; @@ -169,7 +160,15 @@ //printf("%u\n", req->msg.msg_controllen); //msgcontrol = (msg_control*)msg.msg_control; -@@ -9711,6 +9790,7 @@ +@@ -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 @@ break; } } Index: files/patch-dualserverd.h =================================================================== --- files/patch-dualserverd.h (revision 316316) +++ files/patch-dualserverd.h (working copy) @@ -1,41 +1,34 @@ ---- dualserverd.h 2012-11-09 15:45:52.000000000 +0100 -+++ dualserverd.h 2012-11-09 15:55:00.000000000 +0100 -@@ -52,9 +52,11 @@ - #define INADDR_NONE ULONG_MAX - #endif +--- dualserverd.h 2013-04-21 03:13:15.000000000 +0200 ++++ dualserverd.h 2013-04-27 18:55:24.000000000 +0200 +@@ -614,10 +614,19 @@ -+#ifndef __FreeBSD__ - #ifndef IFF_DYNAMIC - #define IFF_DYNAMIC 0x8000 - #endif -+#endif - - #define MYWORD unsigned short - #define MYBYTE unsigned char -@@ -594,10 +596,15 @@ - struct msg_control { -- ulong cmsg_len; -+ u_long cmsg_len; ++#ifdef __FreeBSD__ ++ u_long cmsg_len; ++#else + ulong cmsg_len; ++#endif int cmsg_level; int cmsg_type; -- in_pktinfo pktinfo; -+ #ifdef __FreeBSD__ ++#ifdef __FreeBSD__ + // Arbitrary size, when the size is required we use sizeof + unsigned char pktinfo[100]; -+ #else -+ in_pktinfo pktinfo; -+ #endif ++#else + in_pktinfo pktinfo; ++#endif }; #if defined(__hppa__) || \ -@@ -713,7 +720,7 @@ +@@ -735,7 +744,11 @@ union { int broadCastVal; -- bool pktinfoVal; -+ int pktinfoVal; ++#ifdef __FreeBSD__ ++ int pktinfoVal; ++#else + bool pktinfoVal; ++#endif }; union { --- dualserver.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304271720.r3RHKw6n005064>