From 9d4a531b209034079edd34dc8b364672a9f6625f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 9 Oct 2020 12:02:07 +0200 Subject: [PATCH] Remove condition on uninitialized tv Downstream patch originally included more. I failed to spot tv is not initialized, when removed that not-functional part. --- dnsmasq-2.80-SIOCGSTAMP.patch | 13 ++++++------- dnsmasq.spec | 5 ++++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dnsmasq-2.80-SIOCGSTAMP.patch b/dnsmasq-2.80-SIOCGSTAMP.patch index 3a32bb8..4b08f5d 100644 --- a/dnsmasq-2.80-SIOCGSTAMP.patch +++ b/dnsmasq-2.80-SIOCGSTAMP.patch @@ -1,4 +1,4 @@ -From 31e14f6e52677c675ee4683f9daab5bf21c07dd6 Mon Sep 17 00:00:00 2001 +From 02b6209f8085cbe3443f8623ccdc31f020825507 Mon Sep 17 00:00:00 2001 From: Petr Mensik Date: Wed, 31 Jul 2019 20:35:35 +0200 Subject: [PATCH] Recent kernel no longer supports SIOCGSTAMP @@ -6,11 +6,11 @@ Subject: [PATCH] Recent kernel no longer supports SIOCGSTAMP Build without it defined by kernel headers. Do not try SO_TIMESTAMP until fixed properly. --- - src/dhcp.c | 32 ++++++++++++++++++-------------- - 1 file changed, 18 insertions(+), 14 deletions(-) + src/dhcp.c | 30 +++++++++++++++++------------- + 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/dhcp.c b/src/dhcp.c -index f8d323b..9afdccf 100644 +index bea4688..13373ae 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -178,23 +178,27 @@ void dhcp_packet(time_t now, int pxe_fd) @@ -18,10 +18,9 @@ index f8d323b..9afdccf 100644 return; - #if defined (HAVE_LINUX_NETWORK) -- if (ioctl(fd, SIOCGSTAMP, &tv) == 0) +#if defined (HAVE_LINUX_NETWORK) +#ifdef SIOCGSTAMP -+ if (tv.tv_sec == 0 && ioctl(fd, SIOCGSTAMP, &tv) == 0) + if (ioctl(fd, SIOCGSTAMP, &tv) == 0) recvtime = tv.tv_sec; +#endif @@ -56,5 +55,5 @@ index f8d323b..9afdccf 100644 #elif defined(HAVE_BSD_NETWORK) if (msg.msg_controllen >= sizeof(struct cmsghdr)) -- -2.20.1 +2.26.2 diff --git a/dnsmasq.spec b/dnsmasq.spec index a04abaf..169aadc 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -20,7 +20,7 @@ Name: dnsmasq Version: 2.82 -Release: 3%{?extraversion:.%{extraversion}}%{?dist} +Release: 4%{?extraversion:.%{extraversion}}%{?dist} Summary: A lightweight DHCP/caching DNS server License: GPLv2 or GPLv3 @@ -184,6 +184,9 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf %{_mandir}/man1/dhcp_* %changelog +* Fri Oct 09 2020 Petr Menšík - 2.82-4 +- Remove uninitialized condition from downstream patch + * Wed Sep 30 2020 Petr Menšík - 2.82-3 - Listen only on localhost interface, return port unreachable on all others (#1852373)