summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-config-parser.y
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-09-30 19:40:18 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-09-30 19:44:22 +0200
commitcbe036db892c298c33e77dec2c5129dbb4dccc2c (patch)
tree0cc9bae00c1996f68208fcd64dedb4f34414ce9b /iptables/xtables-config-parser.y
parent9470040d53ca7136b54f32507fe3d31d12736d22 (diff)
iptables-compat: get rid of error reporting via perror
The compat layer should report problems in the iptables way instead. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-config-parser.y')
-rw-r--r--iptables/xtables-config-parser.y10
1 files changed, 4 insertions, 6 deletions
diff --git a/iptables/xtables-config-parser.y b/iptables/xtables-config-parser.y
index 2770a1b9..c8116c3e 100644
--- a/iptables/xtables-config-parser.y
+++ b/iptables/xtables-config-parser.y
@@ -204,10 +204,9 @@ int xtables_config_parse(char *filename, struct nft_table_list *table_list,
break;
case T_TABLE:
table = nft_table_alloc();
- if (table == NULL) {
- perror("nft_table_alloc");
+ if (table == NULL)
return -1;
- }
+
nft_table_attr_set_u32(table, NFT_TABLE_ATTR_FAMILY, family);
nft_table_attr_set(table, NFT_TABLE_ATTR_NAME, e->data);
/* This is intentionally prepending, instead of
@@ -222,10 +221,9 @@ int xtables_config_parse(char *filename, struct nft_table_list *table_list,
break;
case T_CHAIN:
chain = nft_chain_alloc();
- if (chain == NULL) {
- perror("nft_chain_alloc");
+ if (chain == NULL)
return -1;
- }
+
nft_chain_attr_set(chain, NFT_CHAIN_ATTR_TABLE,
(char *)nft_table_attr_get(table, NFT_TABLE_ATTR_NAME));
nft_chain_attr_set_u32(chain, NFT_CHAIN_ATTR_FAMILY,