Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ipset for openSUSE:Factory checked in at 2024-12-18 20:08:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ipset (Old) and /work/SRC/openSUSE:Factory/.ipset.new.29675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ipset" Wed Dec 18 20:08:38 2024 rev:51 rq:1231572 version:7.23 Changes: -------- --- /work/SRC/openSUSE:Factory/ipset/ipset.changes 2024-06-13 15:37:46.893453476 +0200 +++ /work/SRC/openSUSE:Factory/.ipset.new.29675/ipset.changes 2024-12-18 20:08:40.513608492 +0100 @@ -1,0 +2,7 @@ +Mon Dec 16 19:28:18 UTC 2024 - Jan Engelhardt <[email protected]> + +- Update to release 7.23 + * Hold module reference while requesting a module + * Add missing range check in bitmap_ip_uadt + +------------------------------------------------------------------- Old: ---- ipset-7.22.tar.bz2 New: ---- _scmsync.obsinfo build.specials.obscpio ipset-7.23.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ipset.spec ++++++ --- /var/tmp/diff_new_pack.2N1iMk/_old 2024-12-18 20:08:41.161635501 +0100 +++ /var/tmp/diff_new_pack.2N1iMk/_new 2024-12-18 20:08:41.165635666 +0100 @@ -25,7 +25,7 @@ %define ipset_build_kmp 0 %endif Name: ipset -Version: 7.22 +Version: 7.23 Release: 0 Summary: Netfilter ipset administration utility License: GPL-2.0-only ++++++ _scmsync.obsinfo ++++++ mtime: 1734377449 commit: ad956f33283bcdf470c977cbd34e6e78cc30ec43df6810b94ae3242e16f22fb6 url: https://src.opensuse.org/jengelh/ipset revision: master ++++++ ipset-7.22.tar.bz2 -> ipset-7.23.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/ChangeLog new/ipset-7.23/ChangeLog --- old/ipset-7.22/ChangeLog 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/ChangeLog 2024-12-16 19:12:56.000000000 +0100 @@ -1,3 +1,14 @@ +7.23 + - tests: runtest.sh: Keep running, print summary of failed tests + (Phil Sutter) + - tests: cidr.sh: Fix for quirks in RHEL's ipcalc (Phil Sutter) + - tests: cidr.sh: Respect IPSET_BIN env var (Phil Sutter) + - ipset: Fix implicit declaration of function basename (Mike Pagano) + - tests: Reduce testsuite run-time (Phil Sutter) + - lib: ipset: Avoid 'argv' array overstepping (Phil Sutter) + - lib: data: Fix for global-buffer-overflow warning by ASAN + (Phil Sutter) + 7.22 - ipset: fix json output format for IPSET_OPT_IP (Z. Liu) - tests: add namespace test and take into account delayed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/build-aux/ltmain.sh new/ipset-7.23/build-aux/ltmain.sh --- old/ipset-7.22/build-aux/ltmain.sh 2024-06-05 08:53:43.000000000 +0200 +++ new/ipset-7.23/build-aux/ltmain.sh 2024-12-16 19:47:20.000000000 +0100 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.7 Debian-2.4.7-5" +VERSION="2.4.7 Debian-2.4.7-7~deb12u1" package_revision=2.4.7 @@ -572,27 +572,15 @@ # --------------------- # Append VALUE onto the existing contents of VAR. - # We should try to minimise forks, especially on Windows where they are - # unreasonably slow, so skip the feature probes when bash or zsh are - # being used: - if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then - : ${_G_HAVE_ARITH_OP="yes"} - : ${_G_HAVE_XSI_OPS="yes"} - # The += operator was introduced in bash 3.1 - case $BASH_VERSION in - [12].* | 3.0 | 3.0*) ;; - *) - : ${_G_HAVE_PLUSEQ_OP="yes"} - ;; - esac - fi - # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. - test -z "$_G_HAVE_PLUSEQ_OP" \ - && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ - && _G_HAVE_PLUSEQ_OP=yes + if test -z "$_G_HAVE_PLUSEQ_OP" && \ + __PLUSEQ_TEST="a" && \ + __PLUSEQ_TEST+=" b" 2>/dev/null && \ + test "a b" = "$__PLUSEQ_TEST"; then + _G_HAVE_PLUSEQ_OP=yes + fi if test yes = "$_G_HAVE_PLUSEQ_OP" then @@ -2308,7 +2296,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.7-5 + version: $progname $scriptversion Debian-2.4.7-7~deb12u1 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/configure new/ipset-7.23/configure --- old/ipset-7.22/configure 2024-06-05 08:53:45.000000000 +0200 +++ new/ipset-7.23/configure 2024-12-16 19:47:21.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ipset 7.22. +# Generated by GNU Autoconf 2.71 for ipset 7.23. # # Report bugs to <[email protected]>. # @@ -625,8 +625,8 @@ # Identity of this package. PACKAGE_NAME='ipset' PACKAGE_TARNAME='ipset' -PACKAGE_VERSION='7.22' -PACKAGE_STRING='ipset 7.22' +PACKAGE_VERSION='7.23' +PACKAGE_STRING='ipset 7.23' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1485,7 +1485,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ipset 7.22 to adapt to many kinds of systems. +\`configure' configures ipset 7.23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,7 +1556,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ipset 7.22:";; + short | recursive ) echo "Configuration of ipset 7.23:";; esac cat <<\_ACEOF @@ -1696,7 +1696,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ipset configure 7.22 +ipset configure 7.23 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2023,7 +2023,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ipset $as_me 7.22, which was +It was created by ipset $as_me 7.23, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3371,7 +3371,7 @@ # Define the identity of the package. PACKAGE='ipset' - VERSION='7.22' + VERSION='7.23' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -19454,7 +19454,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ipset $as_me 7.22, which was +This file was extended by ipset $as_me 7.23, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19522,7 +19522,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ipset config.status 7.22 +ipset config.status 7.23 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/configure.ac new/ipset-7.23/configure.ac --- old/ipset-7.22/configure.ac 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/configure.ac 2024-12-16 19:12:56.000000000 +0100 @@ -1,5 +1,5 @@ dnl Boilerplate -AC_INIT([ipset],[7.22],[[email protected]]) +AC_INIT([ipset],[7.23],[[email protected]]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/kernel/ChangeLog new/ipset-7.23/kernel/ChangeLog --- old/ipset-7.22/kernel/ChangeLog 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/kernel/ChangeLog 2024-12-16 19:12:56.000000000 +0100 @@ -1,3 +1,11 @@ +7.23 + - netfilter: ipset: Hold module reference while requesting a module + (Phil Sutter) + - netfilter: ipset: add missing range check in bitmap_ip_uadt + (Jeongjun Park) + - netfilter: ipset: Fix suspicious rcu_dereference_protected() + - Replace BUG_ON() with WARN_ON_ONCE() according to usage policy. + 7.22 - netfilter: ipset: Fix race between namespace cleanup and gc in the list:set type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c --- old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c 2024-12-16 19:12:56.000000000 +0100 @@ -165,11 +165,8 @@ ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); if (ret) return ret; - if (ip > ip_to) { + if (ip > ip_to) swap(ip, ip_to); - if (ip < map->first_ip) - return -IPSET_ERR_BITMAP_RANGE; - } } else if (tb[IPSET_ATTR_CIDR]) { u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); @@ -180,7 +177,7 @@ ip_to = ip; } - if (ip_to > map->last_ip) + if (ip < map->first_ip || ip_to > map->last_ip) return -IPSET_ERR_BITMAP_RANGE; for (; !before(ip_to, ip); ip += map->hosts) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_core.c new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_core.c --- old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_core.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_core.c 2024-12-16 19:12:56.000000000 +0100 @@ -54,12 +54,13 @@ MODULE_ALIAS_NFNL_SUBSYS(NFNL_SUBSYS_IPSET); /* When the nfnl mutex or ip_set_ref_lock is held: */ -#define ip_set_dereference(p) \ - rcu_dereference_protected(p, \ +#define ip_set_dereference(inst) \ + rcu_dereference_protected((inst)->ip_set_list, \ lockdep_nfnl_is_held(NFNL_SUBSYS_IPSET) || \ - lockdep_is_held(&ip_set_ref_lock)) + lockdep_is_held(&ip_set_ref_lock) || \ + (inst)->is_deleted) #define ip_set(inst, id) \ - ip_set_dereference((inst)->ip_set_list)[id] + ip_set_dereference(inst)[id] #define ip_set_ref_netlink(inst,id) \ rcu_dereference_raw((inst)->ip_set_list)[id] #define ip_set_dereference_nfnl(p) \ @@ -104,14 +105,19 @@ static bool load_settype(const char *name) { + if (!try_module_get(THIS_MODULE)) + return false; + nfnl_unlock(NFNL_SUBSYS_IPSET); pr_debug("try to load ip_set_%s\n", name); if (request_module("ip_set_%s", name) < 0) { pr_warn("Can't find ip_set type %s\n", name); nfnl_lock(NFNL_SUBSYS_IPSET); + module_put(THIS_MODULE); return false; } nfnl_lock(NFNL_SUBSYS_IPSET); + module_put(THIS_MODULE); return true; } @@ -1143,7 +1149,7 @@ if (!list) goto cleanup; /* nfnl mutex is held, both lists are valid */ - tmp = ip_set_dereference(inst->ip_set_list); + tmp = ip_set_dereference(inst); memcpy(list, tmp, sizeof(struct ip_set *) * inst->ip_set_max); rcu_assign_pointer(inst->ip_set_list, list); /* Make sure all current packets have passed through */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_list_set.c new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_list_set.c --- old/ipset-7.22/kernel/net/netfilter/ipset/ip_set_list_set.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/kernel/net/netfilter/ipset/ip_set_list_set.c 2024-12-16 19:12:56.000000000 +0100 @@ -432,7 +432,7 @@ { struct list_set *map = set->data; - BUG_ON(!list_empty(&map->members)); + WARN_ON_ONCE(!list_empty(&map->members)); kfree(map); set->data = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/lib/data.c new/ipset-7.23/lib/data.c --- old/ipset-7.22/lib/data.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/lib/data.c 2024-12-16 19:12:56.000000000 +0100 @@ -111,6 +111,9 @@ assert(dst); assert(src); + if (strlen(src) < len) + len = strlen(src) + 1; + memcpy(dst, src, len); dst[len - 1] = '\0'; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/lib/ipset.c new/ipset-7.23/lib/ipset.c --- old/ipset-7.22/lib/ipset.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/lib/ipset.c 2024-12-16 19:12:56.000000000 +0100 @@ -343,9 +343,9 @@ assert(*argc >= from + 1); - for (i = from + 1; i <= *argc; i++) + for (i = from + 1; i < *argc; i++) argv[i-1] = argv[i]; - (*argc)--; + argv[--(*argc)] = NULL; return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/src/ipset.c new/ipset-7.23/src/ipset.c --- old/ipset-7.22/src/ipset.c 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/src/ipset.c 2024-12-16 19:12:56.000000000 +0100 @@ -15,6 +15,7 @@ #include <config.h> #include <libipset/ipset.h> /* ipset library */ #include <libipset/xlate.h> /* translate to nftables */ +#include <libgen.h> int main(int argc, char *argv[]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/cidr.sh new/ipset-7.23/tests/cidr.sh --- old/ipset-7.22/tests/cidr.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/cidr.sh 2024-12-16 19:12:56.000000000 +0100 @@ -35,7 +35,7 @@ 255.255.255.252/31 255.255.255.254/32" -ipset="../src/ipset" +ipset="${IPSET_BIN:-../src/ipset}" if which netmask >/dev/null 2>&1; then net_first_addr() { @@ -46,7 +46,7 @@ } elif which ipcalc >/dev/null 2>&1; then net_first_addr() { - ipcalc $1 | awk '/^Address:/{print $2}' + ipcalc $1 | awk '/^(Address|HostMin):/{print $2; exit}' } net_last_addr() { # Netmask tool prints broadcast address as last one, so @@ -54,6 +54,7 @@ # being recognized as special by ipcalc. ipcalc $1 | awk '/^(Hostroute|HostMax):/{out=$2} /^Broadcast:/{out=$2} + /^Address:/{out=$2} END{print out}' } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/resize.sh new/ipset-7.23/tests/resize.sh --- old/ipset-7.22/tests/resize.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/resize.sh 2024-12-16 19:12:56.000000000 +0100 @@ -9,6 +9,6 @@ $ipset n resize-test hash:ip hashsize 64 for x in `seq 1 32`; do for y in `seq 1 255`; do - $ipset a resize-test 192.168.$x.$y - done + echo "a resize-test 192.168.$x.$y" + done | $ipset restore done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/resizec.sh new/ipset-7.23/tests/resizec.sh --- old/ipset-7.22/tests/resizec.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/resizec.sh 2024-12-16 19:12:56.000000000 +0100 @@ -25,65 +25,65 @@ $ipset n test hash:ip $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y comment "text $ip$x$sep$y" + echo "a test $ip$x$sep$y comment \"text $ip$x$sep$y\"" done - done + done | $ipset restore ;; ipport) $ipset n test hash:ip,port $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023 "text $ip$x$sep$y,1023" + echo "a test $ip$x$sep$y,1023 \"text $ip$x$sep$y,1023\"" done - done + done | $ipset restore ;; ipportip) $ipset n test hash:ip,port,ip $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2 comment "text $ip$x$sep$y,1023,$ip2" + echo "a test $ip$x$sep$y,1023,$ip2 comment \"text $ip$x$sep$y,1023,$ip2\"" done - done + done | $ipset restore ;; ipportnet) $ipset n test hash:ip,port,net $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2/$net comment "text $ip$x$sep$y,1023,$ip2/$net" + echo "a test $ip$x$sep$y,1023,$ip2/$net comment \"text $ip$x$sep$y,1023,$ip2/$net\"" done - done + done | $ipset restore ;; net) $ipset n test hash:net $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net comment "text $ip$x$sep$y/$net" + echo "a test $ip$x$sep$y/$net comment \"text $ip$x$sep$y/$net\"" done - done + done | $ipset restore ;; netnet) $ipset n test hash:net,net $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment "text $ip$x$sep$y/$net,$ip$y$sep$x/$net" + echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net comment \"text $ip$x$sep$y/$net,$ip$y$sep$x/$net\"" done - done + done | $ipset restore ;; netport) $ipset n test hash:net,port $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,1023 comment "text $ip$x$sep$y/$net,1023" + echo "a test $ip$x$sep$y/$net,1023 comment \"text $ip$x$sep$y/$net,1023\"" done - done + done | $ipset restore ;; netiface) $ipset n test hash:net,iface $1 hashsize 64 comment for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,eth0 comment "text $ip$x$sep$y/$net,eth0" + echo "$ipset a test $ip$x$sep$y/$net,eth0 comment \"text $ip$x$sep$y/$net,eth0\"" done - done + done | $ipset restore ;; esac $ipset l test | grep ^$ip | while read x y z; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/resizen.sh new/ipset-7.23/tests/resizen.sh --- old/ipset-7.22/tests/resizen.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/resizen.sh 2024-12-16 19:12:56.000000000 +0100 @@ -25,80 +25,79 @@ $ipset n test hash:ip,port,net $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch + echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null + echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" done - done + done | $ipset restore 2>/dev/null ;; netportnet) $ipset n test hash:net,port,net $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2/$net nomatch + echo "a test $ip$x$sep$y,1023,$ip2/$net nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y,1023,$ip2/$net nomatch 2>/dev/null + echo "t test $ip$x$sep$y,1023,$ip2/$net nomatch" done - done + done | $ipset restore 2>/dev/null ;; net) $ipset n test hash:net $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net nomatch + echo "a test $ip$x$sep$y/$net nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y/$net nomatch 2>/dev/null + echo "t test $ip$x$sep$y/$net nomatch" done - done + done | $ipset restore 2>/dev/null ;; netnet) $ipset n test hash:net,net $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch + echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch \ - 2>/dev/null + echo "t test $ip$x$sep$y/$net,$ip$y$sep$x/$net nomatch" done - done + done | $ipset restore 2>/dev/null ;; netport) $ipset n test hash:net,port $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,1023 nomatch + echo "a test $ip$x$sep$y/$net,1023 nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y/$net,1023 nomatch 2>/dev/null + echo "t test $ip$x$sep$y/$net,1023 nomatch" done - done + done | $ipset restore 2>/dev/null ;; netiface) $ipset n test hash:net,iface $1 hashsize 64 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,eth0 nomatch + echo "a test $ip$x$sep$y/$net,eth0 nomatch" done - done + done | $ipset restore for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset t test $ip$x$sep$y/$net,eth0 nomatch 2>/dev/null + echo "t test $ip$x$sep$y/$net,eth0 nomatch" done - done + done | $ipset restore 2>/dev/null ;; esac $ipset x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/resizet.sh new/ipset-7.23/tests/resizet.sh --- old/ipset-7.22/tests/resizet.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/resizet.sh 2024-12-16 19:12:56.000000000 +0100 @@ -25,81 +25,81 @@ $ipset n test hash:ip $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y + echo "a test $ip$x$sep$y" done - done + done | $ipset restore ;; ipmark) $ipset n test hash:ip,mark $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023 + echo "a test $ip$x$sep$y,1023" done - done + done | $ipset restore ;; ipport) $ipset n test hash:ip,port $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023 + echo "a test $ip$x$sep$y,1023" done - done + done | $ipset restore ;; ipportip) $ipset n test hash:ip,port,ip $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2 + echo "a test $ip$x$sep$y,1023,$ip2" done - done + done | $ipset restore ;; ipportnet) $ipset n test hash:ip,port,net $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y,1023,$ip2/$net + echo "a test $ip$x$sep$y,1023,$ip2/$net" done - done + done | $ipset restore ;; netportnet) $ipset n test hash:net,port,net $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 128`; do - $ipset a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net + echo "a test $ip$x$sep$y/$net,1023,$ip$y$sep$x/$net" done - done + done | $ipset restore ;; net) $ipset n test hash:net $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net + echo "a test $ip$x$sep$y/$net" done - done + done | $ipset restore ;; netnet) $ipset n test hash:net,net $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,$ip$y$sep$x/$net + echo "a test $ip$x$sep$y/$net,$ip$y$sep$x/$net" done - done + done | $ipset restore ;; netport) $ipset n test hash:net,port $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,1023 + echo "a test $ip$x$sep$y/$net,1023" done - done + done | $ipset restore ;; netiface) $ipset n test hash:net,iface $1 hashsize 64 timeout 100 for x in `seq 0 16`; do for y in `seq 0 255`; do - $ipset a test $ip$x$sep$y/$net,eth0 + echo "a test $ip$x$sep$y/$net,eth0" done - done + done | $ipset restore ;; esac $ipset l test | grep ^$ip | while read x y z; do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/runtest.sh new/ipset-7.23/tests/runtest.sh --- old/ipset-7.22/tests/runtest.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/runtest.sh 2024-12-16 19:12:56.000000000 +0100 @@ -76,6 +76,7 @@ # Make sure the scripts are executable chmod a+x check_* *.sh +failcount=0 for types in $tests; do $ipset -X test >/dev/null 2>&1 if [ -f $types ]; then @@ -116,7 +117,8 @@ echo "FAILED" echo "Failed test: $cmd" cat .foo.err - exit 1 + let "failcount++" + break fi # sleep 1 done < $filename @@ -136,5 +138,9 @@ done rmmod ip_set >/dev/null 2>&1 rm -f .foo* -echo "All tests are passed" - +if [ "$failcount" -eq 0 ]; then + echo "All tests are passed" +else + echo "$failcount tests have failed" + exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipset-7.22/tests/setlist_resize.sh new/ipset-7.23/tests/setlist_resize.sh --- old/ipset-7.22/tests/setlist_resize.sh 2024-06-05 08:37:43.000000000 +0200 +++ new/ipset-7.23/tests/setlist_resize.sh 2024-12-16 19:12:56.000000000 +0100 @@ -25,9 +25,9 @@ create() { n=$1 while [ $n -le 1024 ]; do - $ipset c test$n hash:ip + echo "c test$n hash:ip" n=$((n+2)) - done + done | $ipset restore } for x in `seq 1 $loop`; do
