代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/iputils 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 18f14be80466ddc8fb17a400be82764a779c8dcd Mon Sep 17 00:00:00 2001
From: Sami Kerola <kerolasa@iki.fi>
Date: Wed, 31 Jul 2019 21:28:12 +0100
Subject: [PATCH] arping: revert partially
- fix sent vs received packages return value
- fix arping's exit code for -U/A
Commit 84ca65ca980315c73f929fed8b6f16bbd698c3a0 caused regression. The
arping -D needs return value evaluation that was the earlier default, in
other cases the new return value should be correct.
Addresses1: https://github.com/iputils/iputils/issues/209
See-also1: https://github.com/void-linux/void-packages/issues/13304
Addresses2: https://github.com/iputils/iputils/issues/247
See-also2:https://github.com/iputils/iputils/commit/68f12fc4a0dbef4ae4c404da24040d22c5a14339
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
arping.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arping.c b/arping.c
index 57114bb..78c8b86 100644
--- a/arping.c
+++ b/arping.c
@@ -797,7 +797,13 @@ static int event_loop(struct run_state *ctl)
close(tfd);
freeifaddrs(ctl->ifa0);
rc |= finish(ctl);
- rc |= (ctl->sent != ctl->received);
+ if (ctl->unsolicited)
+ /* nothing */;
+ else if (ctl->dad && ctl->quit_on_reply)
+ /* Duplicate address detection mode return value */
+ rc |= !(ctl->brd_sent != ctl->received);
+ else
+ rc |= (ctl->sent != ctl->received);
return rc;
}
@@ -942,7 +948,7 @@ int main(int argc, char **argv)
}
memset(&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
- if (ctl.source || ctl.gsrc.s_addr) {
+ if (!ctl.unsolicited && (ctl.source || ctl.gsrc.s_addr)) {
saddr.sin_addr = ctl.gsrc;
if (bind(probe_fd, (struct sockaddr *)&saddr, sizeof(saddr)) == -1)
error(2, errno, "bind");
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。