[libnetfilter_log 2/3] Set nflog_errno as needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some FIXME were put to fix some issues related to nflog_errno not being set. In both case, this was
related to error treatment of libnfnetlink function. As these functions are setting errno to the
correct value, this patch simply copy errno to nflog_errno in libnetfilter_log.

Signed-off-by: Eric Leblond <eric@xxxxxx>
---
 src/libnetfilter_log.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c
index ed92561..9343f90 100644
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -178,7 +178,7 @@ struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh)
 	h->nfnlssh = nfnl_subsys_open(h->nfnlh, NFNL_SUBSYS_ULOG, 
 				      NFULNL_MSG_MAX, 0);
 	if (!h->nfnlssh) {
-		/* FIXME: nflog_errno */
+		nflog_errno = errno;
 		goto out_free;
 	}
 
@@ -210,7 +210,7 @@ struct nflog_handle *nflog_open(void)
 
 	nfnlh = nfnl_open();
 	if (!nfnlh) {
-		/* FIXME: nflog_errno */
+		nflog_errno = errno;
 		return NULL;
 	}
 
-- 
1.5.6.3

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

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux