Re: [PATCH 2/2] Enhanced error message which is displayed if an error occured while creating a chain.

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

 



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/
--
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