summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Crosser <crosser@average.org>2021-12-09 19:26:06 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2022-01-26 02:10:59 +0100
commit5adbd76e49007bc50d4f12a0ed12f175e03f36e7 (patch)
tree1d5099ae4187445709838b660a869357c6242f34
parent959851990ec049ffb0928e86477834c7cb8e7f55 (diff)
netlink: Use abort() in case of netlink_abi_error
Library functions should not use exit(), application that uses the library may contain error handling path, that cannot be executed if library functions calls exit(). For truly fatal errors, using abort() is more acceptable than exit(). Signed-off-by: Eugene Crosser <crosser@average.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 15b8878e..b6d34832 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -59,7 +59,7 @@ void __noreturn __netlink_abi_error(const char *file, int line,
{
fprintf(stderr, "E: Contact urgently your Linux kernel vendor. "
"Netlink ABI is broken: %s:%d %s\n", file, line, reason);
- exit(NFT_EXIT_FAILURE);
+ abort();
}
int netlink_io_error(struct netlink_ctx *ctx, const struct location *loc,