netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] mnl: continue monitor if errno is ESRCH
@ 2017-02-26 16:30 Alexander Alemayhu
  2017-02-26 20:24 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Alemayhu @ 2017-02-26 16:30 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Alexander Alemayhu

Running the test cases in the shell directory while running nft monitor results
in nft exiting with '# ERROR: No such process'. The minimal steps where I could
reproduce is:

nft monitor # shell 1
run-tests.sh testcases/sets/0011add_many_elements_0 # shell 2

Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
---

Not sure if this is considered a fix or desired behaviour, but I was not
expecting monitor to exit like this.

 src/mnl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mnl.c b/src/mnl.c
index 295dd84a5840..a0066a28b44f 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -1129,7 +1129,10 @@ int mnl_nft_event_listener(struct mnl_socket *nf_sock,
 				printf("# ERROR: We lost some netlink events!\n");
 				continue;
 			}
+
 			fprintf(stdout, "# ERROR: %s\n", strerror(errno));
+			if (errno == ESRCH)
+				continue;
 			break;
 		}
 		ret = mnl_cb_run(buf, ret, 0, 0, cb, cb_data);
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-03-02  2:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 16:30 [PATCH nft] mnl: continue monitor if errno is ESRCH Alexander Alemayhu
2017-02-26 20:24 ` Pablo Neira Ayuso
2017-03-01 11:21   ` Pablo Neira Ayuso
2017-03-01 11:41     ` Pablo Neira Ayuso
2017-03-01 14:52       ` Alexander Alemayhu
2017-03-01 15:18         ` Pablo Neira Ayuso
2017-03-01 18:27           ` Alexander Alemayhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).