summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorroot <root@debian.localnet>2012-12-08 18:08:44 +0100
committerPatrick McHardy <kaber@trash.net>2012-12-08 18:11:20 +0100
commit47ff571046570e8f70f545de162e09c2ff147f80 (patch)
tree177823218da0ae77ce0514d60ee77e845c74eade /src/rule.c
parent84792b4813a4ebf59e546acfac80144775e0d47e (diff)
debug: include verbose message in all BUG statements
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rule.c b/src/rule.c
index 3bf48aac..e90e6179 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -329,7 +329,7 @@ void cmd_free(struct cmd *cmd)
table_free(cmd->table);
break;
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
}
xfree(cmd);
@@ -411,7 +411,7 @@ static int do_command_add(struct netlink_ctx *ctx, struct cmd *cmd)
case CMD_OBJ_SETELEM:
return do_add_setelems(ctx, &cmd->handle, cmd->expr);
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
return 0;
}
@@ -430,7 +430,7 @@ static int do_command_delete(struct netlink_ctx *ctx, struct cmd *cmd)
case CMD_OBJ_SETELEM:
return netlink_delete_setelems(ctx, &cmd->handle, cmd->expr);
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
}
@@ -493,7 +493,7 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd)
}
return 0;
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
list_for_each_entry_safe(rule, nrule, &ctx->list, list) {
@@ -519,7 +519,7 @@ static int do_command_flush(struct netlink_ctx *ctx, struct cmd *cmd)
case CMD_OBJ_CHAIN:
return netlink_flush_chain(ctx, &cmd->handle);
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
return 0;
}
@@ -536,7 +536,7 @@ int do_command(struct netlink_ctx *ctx, struct cmd *cmd)
case CMD_FLUSH:
return do_command_flush(ctx, cmd);
default:
- BUG();
+ BUG("invalid command object type %u\n", cmd->obj);
}
}