From patchwork Thu Oct 27 10:20:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero Gonzalez X-Patchwork-Id: 687610 X-Patchwork-Delegate: fw@strlen.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3t4Srs08SKz9t1C for ; Fri, 28 Oct 2016 00:48:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751448AbcJ0NsH (ORCPT ); Thu, 27 Oct 2016 09:48:07 -0400 Received: from smtp3.cica.es ([150.214.5.190]:46097 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751022AbcJ0NsH (ORCPT ); Thu, 27 Oct 2016 09:48:07 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id 3514351F356 for ; Thu, 27 Oct 2016 10:20:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cUzq4Lq1v6bF for ; Thu, 27 Oct 2016 12:20:05 +0200 (CEST) Received: from nfdev2.cica.es (nfdev2.cica.es [IPv6:2a00:9ac0:c1ca:31::221]) (Authenticated sender: servers@cica.es) by smtp.cica.es (Postfix) with ESMTP id 9B8CC51F353 for ; Thu, 27 Oct 2016 12:20:05 +0200 (CEST) Subject: [conntrack-tools PATCH] sync-mode: print errno message on failure From: Arturo Borrero Gonzalez To: netfilter-devel@vger.kernel.org Date: Thu, 27 Oct 2016 12:20:17 +0200 Message-ID: <147756361728.15386.11786527603548778870.stgit@nfdev2.cica.es> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org 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 --- src/sync-mode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; ichannel_num; i++) {