Upgrade upstream version to 2.82 33/251733/3 accepted/tizen/unified/20210120.120834 submit/tizen/20210119.104018
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 19 Jan 2021 03:55:12 +0000 (12:55 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 19 Jan 2021 04:17:01 +0000 (13:17 +0900)
Change-Id: Ia73a4e8c6a2efff2c1d07b195d17529451ca6f95

1  2 
CMakeLists.txt
packaging/dnsmasq.spec
src/config.h
src/lease.c
src/rfc1035.c

diff --cc CMakeLists.txt
index 4b27a71,0000000..024004b
mode 100644,000000..100644
--- /dev/null
@@@ -1,81 -1,0 +1,84 @@@
 +CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 +PROJECT(dnsmasq C)
 +
 +SET(SRCS
 +      src/arp.c
 +      src/auth.c
 +      src/blockdata.c
 +      src/bpf.c
 +      src/cache.c
 +      src/conntrack.c
 +      src/crypto.c
 +      src/dbus.c
 +      src/dhcp6.c
 +      src/dhcp.c
 +      src/dhcp-common.c
 +      src/dnsmasq.c
 +      src/dnssec.c
 +      src/domain.c
++      src/dump.c
 +      src/edns0.c
 +      src/forward.c
 +      src/helper.c
 +      src/inotify.c
 +      src/ipset.c
 +      src/lease.c
 +      src/log.c
 +      src/loop.c
++      src/metrics.c
 +      src/netlink.c
 +      src/network.c
 +      src/option.c
 +      src/outpacket.c
 +      src/poll.c
 +      src/radv.c
 +      src/rfc1035.c
 +      src/rfc2131.c
 +      src/rfc3315.c
 +      src/rrfilter.c
 +      src/slaac.c
 +      src/tables.c
 +      src/tftp.c
++      src/ubus.c
 +      src/util.c
 +)
 +
 +SET(PACKAGE ${PROJECT_NAME})
 +SET(PKGNAME ${PACKAGE})
 +SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 +SET(BINDIR "${PREFIX}/bin")
 +
 +IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 +      SET(CMAKE_BUILD_TYPE "Release")
 +ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 +MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
 +
 +#INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
 +
 +INCLUDE(FindPkgConfig)
 +pkg_check_modules(pkgs REQUIRED dbus-1)
 +
 +FOREACH(flag ${pkgs_CFLAGS})
 +      SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 +ENDFOREACH(flag)
 +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
 +
 +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
 +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 +SET(CMAKE_C_FLAGS_RELEASE "-O2")
 +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
 +
 +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
 +ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
 +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
 +
 +FIND_PROGRAM(UNAME NAMES uname)
 +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
 +#IF("${ARCH}" STREQUAL "arm")
 +#     ADD_DEFINITIONS("-D_MMICHECK_ARM_CODE_")
 +#ENDIF("${ARCH}" STREQUAL "arm")
 +
 +ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
 +
 +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
index 51fb21b,0000000..c7ee07c
mode 100644,000000..100644
--- /dev/null
@@@ -1,42 -1,0 +1,42 @@@
- Version:    2.79
 +Name:       dnsmasq
 +Summary:    dnsmasq, DNS forwarder.
++Version:    2.82
 +Release:    1
 +Group:      System/Network
 +License:    GPL-2.0+
 +Source0:    %{name}-%{version}.tar.gz
 +Source1001:     packaging/dnsmasq.manifest
 +BuildRequires: cmake
 +BuildRequires: pkgconfig(dbus-1)
 +BuildRequires: pkgconfig(libtzplatform-config)
 +
 +%description
 +Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server.
 +It is designed to provide DNS and, optionally, DHCP, to a small network.
 +It can serve the names of local machines that are not in the global DNS.
 +The DHCP server integrates with the DNS server and allows machines with
 +DHCP-allocated addresses to appear in DNS with names configured either
 +in each host or in a central configuration file. Dnsmasq supports static
 +and dynamic DHCP leases and BOOTP for network booting of diskless machines.
 +
 +%prep
 +%setup -q
 +cp %{SOURCE1001} .
 +
 +%build
 +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
 +make %{?jobs:-j%jobs}
 +
 +%post
 +mkdir -p %{TZ_SYS_VAR}/lib/misc
 +
 +%install
 +%make_install
 +mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
 +cp dbus/dnsmasq.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/dnsmasq.conf
 +
 +%files
 +%manifest %{name}.manifest
 +%{_bindir}/dnsmasq
 +%license COPYING
 +%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
diff --cc src/config.h
@@@ -14,8 -14,6 +14,8 @@@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
  
- #define VERSION "2.79"
++#define VERSION "2.82"
 +
  #define FTABSIZ 150 /* max number of outstanding requests (default) */
  #define MAX_PROCS 20 /* max no children for TCP requests */
  #define CHILD_LIFETIME 150 /* secs 'till terminated (RFC1035 suggests > 120s) */
diff --cc src/lease.c
@@@ -797,12 -801,13 +813,14 @@@ struct dhcp_lease *lease6_allocate(stru
  
    if (lease)
      {
 -      lease->addr6 = *addrp;
 +      memcpy(&lease->addr6, addrp, sizeof(struct in6_addr));
        lease->flags |= lease_type;
        lease->iaid = 0;
+       daemon->metrics[METRIC_LEASES_ALLOCATED_6]++;
      }
  
 +  my_syslog(MS_DHCP | LOG_INFO, "lease6_allocate(): -");
    return lease;
  }
  #endif
diff --cc src/rfc1035.c
Simple merge