summaryrefslogtreecommitdiffstats
path: root/src/netlink.c
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2014-09-15 14:10:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-09-16 18:57:56 +0200
commit52f169d3938492e42112e0412e17780db7949227 (patch)
tree203f66e4aa03688655383c5142719af46854efce /src/netlink.c
parentae355b89e7b74c28de753bf2878a8e189030ad47 (diff)
netlink: include file and line in netlink ABI errors
Let's give some more information when netlink ABI errors happens. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 7d3e71ff..84d5db3c 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -80,10 +80,11 @@ static void netlink_open_mon_sock(void)
nf_mon_sock = nfsock_open();
}
-void __noreturn netlink_abi_error(void)
+void __noreturn __netlink_abi_error(const char *file, int line,
+ const char *reason)
{
fprintf(stderr, "E: Contact urgently your Linux kernel vendor. "
- "Netlink ABI is broken: %s\n", strerror(errno));
+ "Netlink ABI is broken: %s:%d %s\n", file, line, reason);
exit(NFT_EXIT_FAILURE);
}