From e19e0ed6cde3176b7ef519748f893aa1afc86fa7 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 18 Apr 2013 17:53:59 +0200 Subject: cmd/netlink: make sure we always have a location in netlink operations Improve error reporting by always using a location in netlink operations. Signed-off-by: Patrick McHardy --- include/rule.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index a992489b..eda6b2c2 100644 --- a/include/rule.h +++ b/include/rule.h @@ -62,12 +62,14 @@ extern struct symbol *symbol_lookup(const struct scope *scope, * * @list: list node * @handle: table handle + * @location: location the table was defined at * @chains: chains contained in the table * @sets: sets contained in the table */ struct table { struct list_head list; struct handle handle; + struct location location; struct scope scope; struct list_head chains; struct list_head sets; @@ -92,6 +94,7 @@ enum chain_flags { * * @list: list node in table list * @handle: chain handle + * @location: location the chain was defined at * @flags: chain flags * @hooknum: hook number (base chains) * @priority: hook priority (base chains) @@ -100,6 +103,7 @@ enum chain_flags { struct chain { struct list_head list; struct handle handle; + struct location location; uint32_t flags; unsigned int hooknum; unsigned int priority; @@ -253,7 +257,8 @@ struct cmd { }; extern struct cmd *cmd_alloc(enum cmd_ops op, enum cmd_obj obj, - const struct handle *h, void *data); + const struct handle *h, const struct location *loc, + void *data); extern void cmd_free(struct cmd *cmd); #include -- cgit v1.2.3