From 516600858cb54906fb728d04e5edf1131ee7b3b2 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 10 Apr 2018 20:48:35 +0200 Subject: 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. --- lib/session.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/session.c') diff --git a/lib/session.c b/lib/session.c index b1c5f5e..ca96aaa 100644 --- a/lib/session.c +++ b/lib/session.c @@ -239,6 +239,21 @@ ipset_session_report(struct ipset_session *session, return -1; } +/** + * 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 -- cgit v1.2.3