Blame SOURCES/iputils-arping-network-down.patch

ba80c1
commit 66b793822d475bb40aa370c9ef7fc0499b22a5e2
ba80c1
Author: Jan Synacek <jsynacek@redhat.com>
ba80c1
Date:   Thu Feb 23 12:59:46 2017 +0100
ba80c1
ba80c1
    arping: exit if network disappears while running
ba80c1
    
ba80c1
    Originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=1387542
ba80c1
ba80c1
diff --git a/arping.c b/arping.c
ba80c1
index 1a3f40b..dce8f7b 100644
ba80c1
--- a/arping.c
ba80c1
+++ b/arping.c
ba80c1
@@ -1227,6 +1227,8 @@ main(int argc, char **argv)
ba80c1
 		if ((cc = recvfrom(s, packet, sizeof(packet), 0,
ba80c1
 				   (struct sockaddr *)&from, &alen)) < 0) {
ba80c1
 			perror("arping: recvfrom");
ba80c1
+			if (errno == ENETDOWN)
ba80c1
+				exit(2);
ba80c1
 			continue;
ba80c1
 		}
ba80c1