summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch')
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch b/meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch
new file mode 100644
index 0000000000..8495178879
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-arping-revert-partially-fix-sent-vs-received-package.patch
@@ -0,0 +1,39 @@
1From 18f14be80466ddc8fb17a400be82764a779c8dcd Mon Sep 17 00:00:00 2001
2From: Sami Kerola <kerolasa@iki.fi>
3Date: Wed, 31 Jul 2019 21:28:12 +0100
4Subject: [PATCH] arping: revert partially - fix sent vs received packages
5 return value
6
7Commit 84ca65ca980315c73f929fed8b6f16bbd698c3a0 caused regression. The
8arping -D needs return value evaluation that was the earlier default, in
9other cases the new return value should be correct.
10
11Addresses: https://github.com/iputils/iputils/issues/209
12See-also: https://github.com/void-linux/void-packages/issues/13304
13Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14Upstream-Status: Backport [https://github.com/iputils/iputils/commit/18f14be80466ddc8fb17a400be82764a779c8dcd]
15Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
16---
17 arping.c | 6 +++++-
18 1 file changed, 5 insertions(+), 1 deletion(-)
19
20diff --git a/arping.c b/arping.c
21index 77c9c56..2c87c15 100644
22--- a/arping.c
23+++ b/arping.c
24@@ -792,7 +792,11 @@ static int event_loop(struct run_state *ctl)
25 close(tfd);
26 freeifaddrs(ctl->ifa0);
27 rc |= finish(ctl);
28- rc |= (ctl->sent != ctl->received);
29+ if (ctl->dad && ctl->quit_on_reply)
30+ /* Duplicate address detection mode return value */
31+ rc |= !(ctl->brd_sent != ctl->received);
32+ else
33+ rc |= (ctl->sent != ctl->received);
34 return rc;
35 }
36
37--
382.18.4
39