SHA256
1
0
forked from pool/ipset

Accepting request 650569 from security:netfilter

- Add ipset-file.diff [boo#1116432].

OBS-URL: https://build.opensuse.org/request/show/650569
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ipset?expand=0&rev=32
This commit is contained in:
Dominique Leuenberger 2018-11-22 12:22:25 +00:00 committed by Git OBS Bridge
commit 65697cb18c
3 changed files with 46 additions and 1 deletions

39
ipset-file.diff Normal file
View File

@ -0,0 +1,39 @@
From a680d3fdbb637fae53c60e4a30f028bd5ed1fe4b Mon Sep 17 00:00:00 2001
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Date: Sat, 10 Nov 2018 17:34:57 +0100
Subject: Fix to list/save into file specified by option
list/save into file given by "-f filename" did not work in 7.0,
reported by Isaac Good.
---
lib/ipset.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/ipset.c b/lib/ipset.c
index 8d05b39..4366e60 100644
--- a/lib/ipset.c
+++ b/lib/ipset.c
@@ -633,7 +633,7 @@ restore(struct ipset *ipset)
if (ipset->filename) {
ret = ipset_session_io_normal(session, ipset->filename,
IPSET_IO_INPUT);
- if (ret)
+ if (ret < 0)
return ret;
f = ipset_session_io_stream(session, IPSET_IO_INPUT);
}
@@ -1204,9 +1204,10 @@ ipset_parse_argv(struct ipset *ipset, int oargc, char *oargv[])
if (ipset->filename != NULL) {
ret = ipset_session_io_normal(session,
ipset->filename, IPSET_IO_OUTPUT);
- if (!ret)
+ if (ret < 0)
return ret;
}
+ /* Fall through to parse optional setname */
case IPSET_CMD_DESTROY:
case IPSET_CMD_FLUSH:
/* Args: [setname] */
--
cgit v1.2.1

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 20 17:58:53 UTC 2018 - Arjen de Korte <suse+build@de-korte.org>
- Add ipset-file.diff [boo#1116432].
-------------------------------------------------------------------
Tue Oct 30 07:54:50 UTC 2018 - Jan Engelhardt <jengelh@inai.de>

View File

@ -36,6 +36,7 @@ Url: http://ipset.netfilter.org/
Source: http://ipset.netfilter.org/%name-%version.tar.bz2
Source3: %name-preamble
Patch1: ipset-destdir.diff
Patch2: ipset-file.diff
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@ -104,7 +105,7 @@ when matching an entry against a set.
%prep
%setup -q
%patch -P 1 -p1
%patch -P 1 -P 2 -p1
%build
# build wants to call modinfo at some point