* [conntrack-tools PATCH] sync-mode: print errno message on failure
@ 2016-10-27 10:20 Arturo Borrero Gonzalez
2016-10-27 14:45 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-10-27 10:20 UTC (permalink / raw)
To: netfilter-devel
I have observed this message several times:
[ERROR] can't open channel socket
[ERROR] initialization failed
which is very difficult to understand.
The errno message should help this to be a bit more explicit.
With this patch, in the case of wrong interface:
[ERROR] can't open channel socket: No such device
[ERROR] initialization failed
Signed-off-by: Arturo Borrero Gonzalez <arturo@debian.org>
---
src/sync-mode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/sync-mode.c b/src/sync-mode.c
index e69ecfe..8fe65f1 100644
--- a/src/sync-mode.c
+++ b/src/sync-mode.c
@@ -412,7 +412,8 @@ static int init_sync(void)
STATE_SYNC(channel) =
multichannel_open(CONFIG(channel), CONFIG(channel_num));
if (STATE_SYNC(channel) == NULL) {
- dlog(LOG_ERR, "can't open channel socket");
+ dlog(LOG_ERR, "can't open channel socket: %s",
+ strerror(errno));
return -1;
}
for (i=0; i<STATE_SYNC(channel)->channel_num; i++) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [conntrack-tools PATCH] sync-mode: print errno message on failure
2016-10-27 10:20 [conntrack-tools PATCH] sync-mode: print errno message on failure Arturo Borrero Gonzalez
@ 2016-10-27 14:45 ` Florian Westphal
0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2016-10-27 14:45 UTC (permalink / raw)
To: Arturo Borrero Gonzalez; +Cc: netfilter-devel
Arturo Borrero Gonzalez <arturo@debian.org> wrote:
> I have observed this message several times:
>
> [ERROR] can't open channel socket
> [ERROR] initialization failed
>
> which is very difficult to understand.
>
> The errno message should help this to be a bit more explicit.
> With this patch, in the case of wrong interface:
>
> [ERROR] can't open channel socket: No such device
Indeed, much better.
Applied, thanks Arturo.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-27 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 10:20 [conntrack-tools PATCH] sync-mode: print errno message on failure Arturo Borrero Gonzalez
2016-10-27 14:45 ` Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.