@@ -162,7 +162,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, struct rtattr *arg)
int d_ok = 0;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_ACT_BPF_MAX, arg);
@@ -111,7 +111,7 @@ static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_connmark *ci;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_CONNMARK_MAX, arg);
if (tb[TCA_CONNMARK_PARMS] == NULL) {
@@ -167,7 +167,7 @@ print_csum(struct action_util *au, FILE *f, struct rtattr *arg)
int uflag_count = 0;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_CSUM_MAX, arg);
@@ -444,7 +444,7 @@ static int print_ct(struct action_util *au, FILE *f, struct rtattr *arg)
int ct_action = 0;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_CT_MAX, arg);
if (tb[TCA_CT_PARMS] == NULL) {
@@ -189,7 +189,7 @@ static int print_ctinfo(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_ctinfo *ci;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_CTINFO_MAX, arg);
if (!tb[TCA_CTINFO_ACT]) {
@@ -172,7 +172,7 @@ print_gact(struct action_util *au, FILE *f, struct rtattr *arg)
struct rtattr *tb[TCA_GACT_MAX + 1];
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_GACT_MAX, arg);
@@ -228,7 +228,7 @@ static int print_ife(struct action_util *au, FILE *f, struct rtattr *arg)
SPRINT_BUF(b2);
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_IFE_MAX, arg);
@@ -433,7 +433,7 @@ print_ipt(struct action_util *au, FILE * f, struct rtattr *arg)
__u32 hook;
if (arg == NULL)
- return -1;
+ return 0;
lib_dir = getenv("IPTABLES_LIB_DIR");
if (!lib_dir)
@@ -282,7 +282,7 @@ print_mirred(struct action_util *au, FILE *f, struct rtattr *arg)
const char *dev;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_MIRRED_MAX, arg);
@@ -198,7 +198,7 @@ static int print_mpls(struct action_util *au, FILE *f, struct rtattr *arg)
__u32 val;
if (!arg)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_MPLS_MAX, arg);
@@ -147,7 +147,7 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg)
int len;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_NAT_MAX, arg);
@@ -746,7 +746,7 @@ static int print_pedit(struct action_util *au, FILE *f, struct rtattr *arg)
int err;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_PEDIT_MAX, arg);
@@ -144,7 +144,7 @@ static int print_sample(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_sample *p;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_SAMPLE_MAX, arg);
@@ -166,7 +166,7 @@ static int print_simple(struct action_util *au, FILE *f, struct rtattr *arg)
char *simpdata;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_DEF_MAX, arg);
@@ -199,7 +199,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_skbedit *p;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_SKBEDIT_MAX, arg);
@@ -169,7 +169,7 @@ static int print_skbmod(struct action_util *au, FILE *f, struct rtattr *arg)
SPRINT_BUF(b2);
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_SKBMOD_MAX, arg);
@@ -671,7 +671,7 @@ static int print_tunnel_key(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_tunnel_key *parm;
if (!arg)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_TUNNEL_KEY_MAX, arg);
@@ -183,7 +183,7 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg)
struct tc_vlan *parm;
if (arg == NULL)
- return -1;
+ return 0;
parse_rtattr_nested(tb, TCA_VLAN_MAX, arg);
@@ -320,7 +320,7 @@ print_ipt(struct action_util *au, FILE *f, struct rtattr *arg)
__u32 hook;
if (arg == NULL)
- return -1;
+ return 0;
/* copy tcipt_globals because .opts will be modified by iptables */
struct xtables_globals tmp_tcipt_globals = tcipt_globals;
@@ -358,7 +358,7 @@ print_ipt(struct action_util *au, FILE * f, struct rtattr *arg)
__u32 hook;
if (arg == NULL)
- return -1;
+ return 0;
set_lib_dir();