Blame SOURCES/dnsmasq-2.79-rh1749092-fail.patch

88706c
From 8fda4b4620ca2b23152ca805d14c7cde1083fe31 Mon Sep 17 00:00:00 2001
88706c
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
88706c
Date: Tue, 1 Oct 2019 16:08:28 +0200
88706c
Subject: [PATCH] Report error on dhcp_release
88706c
88706c
If no IPv4 address is present on given interface, the tool would not
88706c
send any request. It would not report any error at the same time. Report
88706c
error if request send failed.
88706c
88706c
Signed-off-by: Petr Mensik <pemensik@redhat.com>
88706c
---
88706c
 contrib/lease-tools/dhcp_release.c | 6 +++++-
88706c
 1 file changed, 5 insertions(+), 1 deletion(-)
88706c
88706c
diff --git a/contrib/lease-tools/dhcp_release.c b/contrib/lease-tools/dhcp_release.c
88706c
index c866cd9..30e77c6 100644
88706c
--- a/contrib/lease-tools/dhcp_release.c
88706c
+++ b/contrib/lease-tools/dhcp_release.c
88706c
@@ -223,7 +223,11 @@ static struct in_addr find_interface(struct in_addr client, int fd, unsigned int
88706c
 	    ifr->ifr_addr.sa_family = AF_INET;
88706c
 	    if (ioctl(ifrfd, SIOCGIFADDR, ifr) != -1)
88706c
 	      return ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr;
88706c
-	    exit(0);
88706c
+	    else
88706c
+	      {
88706c
+		fprintf(stderr, "error: local IPv4 address not found\n");
88706c
+		exit(1);
88706c
+	      }
88706c
           }
88706c
 	else if (h->nlmsg_type == RTM_NEWADDR)
88706c
           {
88706c
-- 
88706c
2.20.1
88706c