lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Mar 2013 16:42:24 +0100
From:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:	tgraf@...g.ch
Cc:	shemminger@...tta.com, netdev@...r.kernel.org,
	eric.dumazet@...il.com, Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: [PATCH iproute2 v2] libnetlink: check flag NLM_F_DUMP_INTR during dumps

When this flag is set, it means that dump was interrupted and result may be
wrong. Inform the user and let him choose to restart or not.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
---

v2: do not stop the dump, only display a warning

 lib/libnetlink.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index f262959..1a882b2 100644
--- a/lib/libnetlink.c
+++ b/lib/libnetlink.c
@@ -230,6 +230,10 @@ int rtnl_dump_filter_l(struct rtnl_handle *rth,
 				    h->nlmsg_seq != rth->dump)
 					goto skip_it;
 
+				if (h->nlmsg_flags & NLM_F_DUMP_INTR)
+					fprintf(stderr,
+						"Dump was interrupted and may be wrong.\n");
+
 				if (h->nlmsg_type == NLMSG_DONE) {
 					found_done = 1;
 					break; /* process next filter */
-- 
1.8.0.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ