diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-02 14:06:23 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-02 16:29:30 +0200 |
commit | 9ddc4362ce64a0b273c2fbcb819fa061aadd02a5 (patch) | |
tree | 766d4b76b931e9d700d4d265d0d4ff2c0c540a59 /src/main.c | |
parent | 9c0ed46f68cada9f3455be91adb553d020012596 (diff) |
src: introduce abi_breakage()
Changes in the netlink attribute layout is considered to be a kernel ABI
breakage, so report this immediately and stop execution, instead of lazy
error back to the client application, which cannot do anything with
this.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -154,3 +154,10 @@ const struct nfnl_handle *nfct_nfnlh(struct nfct_handle *cth) /** * @} */ + +void __noreturn __abi_breakage(const char *file, int line, const char *reason) +{ + fprintf(stderr, "ctnetlink kernel ABI is broken, contact your vendor.\n" + "%s:%d reason: %s\n", file, line, reason); + exit(EXIT_FAILURE); +} |