diff options
| author | Alex Harpin <development@landsofshadow.co.uk> | 2015-10-18 11:48:55 +0100 | 
|---|---|---|
| committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-10-18 11:48:55 +0100 | 
| commit | cebada14c32e6603380a913fb852854c46605d1d (patch) | |
| tree | 88396b80b0a558866002809642876792f3c60de9 /src/callback.c | |
| parent | 0bb90c44862ce3f9018656beadfbc2aac4a0d517 (diff) | |
| parent | 1891e0e2cefced50e7bfdacd50942cefe5bf73ba (diff) | |
| download | libmnl-cebada14c32e6603380a913fb852854c46605d1d.tar.gz libmnl-cebada14c32e6603380a913fb852854c46605d1d.zip  | |
Merge remote-tracking branch 'source/master' into upstreamupstream
Diffstat (limited to 'src/callback.c')
| -rw-r--r-- | src/callback.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/src/callback.c b/src/callback.c index 6337acc..f023401 100644 --- a/src/callback.c +++ b/src/callback.c @@ -65,6 +65,12 @@ __mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq,  			return -1;  		} +		/* dump was interrupted */ +		if (nlh->nlmsg_flags & NLM_F_DUMP_INTR) { +			errno = EINTR; +			return -1; +		} +  		/* netlink data message handling */  		if (nlh->nlmsg_type >= NLMSG_MIN_TYPE) {   			if (cb_data){ @@ -117,7 +123,8 @@ out:   * This function propagates the callback return value. On error, it returns   * -1 and errno is explicitly set. If the portID is not the expected, errno   * is set to ESRCH. If the sequence number is not the expected, errno is set - * to EPROTO. + * to EPROTO. If the dump was interrupted, errno is set to EINTR and you should + * request a new fresh dump again.   */  int  mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,  | 
