]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
cache: report an error message if cache initialization fails
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Jul 2022 15:17:37 +0000 (17:17 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 20 Jul 2022 11:27:34 +0000 (13:27 +0200)
cache initialization failure (which should not ever happen) is not
reported to the user.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c

index b61710b24af7ec2b17cd9980d98b312698e1ab1f..f790f995e07b048953445f7237fa8e3e4790a735 100644 (file)
@@ -1181,7 +1181,11 @@ replay:
                        goto replay;
                }
 
+               erec_queue(error(&netlink_location, "cache initialization failed: %s",
+                                strerror(errno)),
+                          msgs);
                nft_cache_release(cache);
+
                return -1;
        }