All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Hendrik Schwartke <hendrik@os-t.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 2/2] Enhanced error message which is displayed if an error occured while creating a chain.
Date: Tue, 10 Jun 2014 17:06:59 +0200	[thread overview]
Message-ID: <20140610150659.GB13025@localhost> (raw)
In-Reply-To: <1402412087-9825-2-git-send-email-hendrik@os-t.de>

On Tue, Jun 10, 2014 at 04:54:47PM +0200, Hendrik Schwartke wrote:
> Creating a base chain which depends on unsupported kernel features
> (e.g. creating a chain with a nat hook without loading the nat
> kernel module) results in a confusing error message.
> This patch added a meaningful hint.
>
> @@ -500,8 +501,13 @@ int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h,
>          nft_chain_free(nlc);
>  
>          if (err < 0) {
> -                netlink_io_error(ctx, loc, "Could not add chain: %s",
> -                                 strerror(errno));
> +                const char *expl="";
> +                if(is_basechain && errno==ENOENT)
> +                        expl=" - perhaps some kernel modules are not"
> +                             " loaded or the kernel doesn't include"
> +                             " necessary features.";

I prefer to add this in the FAQ section in the nftables HOWTO [1] to
troubleshooting. I can create an account for you, so you can edit that
yourself.

[1] http://wiki.nftables.org/

  reply	other threads:[~2014-06-10 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 14:54 [PATCH 1/2] Removed duplicated code in netlink.c Hendrik Schwartke
2014-06-10 14:54 ` [PATCH 2/2] Enhanced error message which is displayed if an error occured while creating a chain Hendrik Schwartke
2014-06-10 15:06   ` Pablo Neira Ayuso [this message]
2014-06-10 15:02 ` [PATCH 1/2] Removed duplicated code in netlink.c Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140610150659.GB13025@localhost \
    --to=pablo@netfilter.org \
    --cc=hendrik@os-t.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.