summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/parse.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/parse.c b/lib/parse.c
index aabf2a8..974eaf8 100644
--- a/lib/parse.c
+++ b/lib/parse.c
@@ -493,13 +493,13 @@ ipset_parse_proto(struct ipset_session *session,
assert(str);
if (string_to_u8(session, str, &protonum, IPSET_WARNING) == 0)
- protoent = getprotobynumber(protonum);
- else {
- /* No error, so reset false error messages */
- ipset_session_report_reset(session);
- protoent = getprotobyname(strcasecmp(str, "icmpv6") == 0
- ? "ipv6-icmp" : str);
- }
+ return ipset_session_data_set(session, opt, &protonum);
+
+ /* No error, so reset false error messages */
+ ipset_session_report_reset(session);
+ protoent = getprotobyname(strcasecmp(str, "icmpv6") == 0
+ ? "ipv6-icmp" : str);
+
if (protoent == NULL)
return syntax_err("cannot parse '%s' "
"as a protocol", str);