From 020936c8c3375e1efe44a3087c891a4b2cbfe044 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 22 Jun 2010 10:49:41 +0200 Subject: ipset 5: last new feature added - the hash types can now store protocol together port, not only port - lots of fixes everywhere: parser, error reporting, manpage The last bits on the todo list before announcing ipset 5: - recheck all the error messages - add possibly more tests - polish manpage --- src/errcode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/errcode.c') diff --git a/src/errcode.c b/src/errcode.c index c30ecb6..ae0d8c8 100644 --- a/src/errcode.c +++ b/src/errcode.c @@ -102,6 +102,10 @@ static const struct ipset_errcode_table hash_errcode_table[] = { "Hash is full, cannot add more elements" }, { IPSET_ERR_HASH_ELEM, 0, "Null-valued element, cannot be stored in a hash type of set" }, + { IPSET_ERR_INVALID_PROTO, 0, + "Invalid protocol specified" }, + { IPSET_ERR_MISSING_PROTO, 0, + "Protocol missing, but must be specified" }, { }, }; @@ -144,7 +148,7 @@ ipset_errcode(struct ipset_session *session, enum ipset_cmd cmd, int errcode) if (errcode >= IPSET_ERR_TYPE_SPECIFIC) { const struct ipset_type *type; - type = ipset_session_data_get(session, IPSET_OPT_TYPE); + type = ipset_saved_type(session); if (type) { if (MATCH_TYPENAME(type->name, "bitmap:")) table = bitmap_errcode_table; -- cgit v1.2.3