else
filename = argv[1];
- nft_init(&h);
+ if (nft_init(&h) < 0) {
+ fprintf(stderr, "Failed to initialize nft: %s\n",
+ strerror(errno));
+ return EXIT_FAILURE;
+ }
return nft_xtables_config_load(&h, filename, NFT_LOAD_VERBOSE) == 0 ?
EXIT_SUCCESS : EXIT_FAILURE;
init_extensions4();
#endif
- nft_init(&h);
+ if (nft_init(&h) < 0) {
+ fprintf(stderr, "%s/%s Failed to initialize nft: %s\n",
+ xtables_globals.program_name,
+ xtables_globals.program_version,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
while ((c = getopt_long(argc, argv, "bcvthnM:T:46", options, NULL)) != -1) {
switch (c) {
init_extensions();
init_extensions4();
#endif
- nft_init(&h);
+ if (nft_init(&h) < 0) {
+ fprintf(stderr, "%s/%s Failed to initialize nft: %s\n",
+ xtables_globals.program_name,
+ xtables_globals.program_version,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
while ((c = getopt_long(argc, argv, "bcdt:46", options, NULL)) != -1) {
switch (c) {
init_extensions4();
#endif
- nft_init(&h);
+ if (nft_init(&h) < 0) {
+ fprintf(stderr, "%s/%s Failed to initialize nft: %s\n",
+ xtables_globals.program_name,
+ xtables_globals.program_version,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
ret = do_commandx(&h, argc, argv, &table);
if (!ret) {