diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-01-18 17:17:46 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-01-18 17:17:46 +0100 |
commit | cac607bd8850e00356e4d97b05e7c8adfb3fa640 (patch) | |
tree | befa146e2c99f2557ee385865070c5853eb887b7 /include | |
parent | 1d4c46ed1088f40315695bc2de12bddc35b536a1 (diff) |
Show correct line numbers in restore output for parser errors
Parser errors are reported by a wrong lineno at restore, bug reported
by Holger Eitzenberger:
create foo6 hash:ip hashsize 64 family inet6
add foo6 20a1:1234:5678::/64
add foo6 20a1:1234:5679::/64
you get:
ipset v5.2: Error in line 1: Syntax error: plain IP address must be supplied: 20a1:1234:5678::/64
Should be line 2 though.
The solution is to set the session lineno before parsing.
Diffstat (limited to 'include')
-rw-r--r-- | include/libipset/session.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libipset/session.h b/include/libipset/session.h index 02e8b36..a06c79f 100644 --- a/include/libipset/session.h +++ b/include/libipset/session.h @@ -24,6 +24,7 @@ struct ipset_handle; extern struct ipset_data * ipset_session_data(const struct ipset_session *session); extern struct ipset_handle * ipset_session_handle(const struct ipset_session *session); extern const struct ipset_type * ipset_saved_type(const struct ipset_session *session); +extern void ipset_session_lineno(struct ipset_session *session, uint32_t lineno); enum ipset_err_type { IPSET_ERROR, |