summaryrefslogtreecommitdiffstats
path: root/lib/session.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2018-04-10 20:48:35 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2018-04-10 20:48:35 +0200
commit516600858cb54906fb728d04e5edf1131ee7b3b2 (patch)
treeee31a33efc24fcc1db35b479e3fdc0057ed2f030 /lib/session.c
parent86f11b1cfc5832ba32cb8dd4474b18671a9f1e08 (diff)
Fix parsing service names for ports
Parsing is attempted both for numbers and service names and the temporary stored error message triggered to reset the state parameters about the set. Reported by Yuri D'Elia.
Diffstat (limited to 'lib/session.c')
-rw-r--r--lib/session.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/session.c b/lib/session.c
index b1c5f5e..ca96aaa 100644
--- a/lib/session.c
+++ b/lib/session.c
@@ -240,6 +240,21 @@ ipset_session_report(struct ipset_session *session,
}
/**
+ * ipset_session_warning_as_error - set warning as error
+ * @session: session structrure
+ *
+ * Returns -1.
+ */
+int
+ipset_session_warning_as_error(struct ipset_session *session)
+{
+ session->errmsg = session->report;
+ session->warnmsg = NULL;
+ ipset_data_reset(ipset_session_data(session));
+ return -1;
+}
+
+/**
* ipset_session_reset - reset the report buffer
* @session: session structure
*