From 4ed3f95632ed62f4ef21125250a013536917bc69 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 5 Apr 2023 17:03:04 +0300 Subject: [PATCH] import ipset-7.11-7.el9_1 --- SOURCES/ipset.start-stop | 8 +++++++- SPECS/ipset.spec | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/SOURCES/ipset.start-stop b/SOURCES/ipset.start-stop index 0c493dc..377beed 100644 --- a/SOURCES/ipset.start-stop +++ b/SOURCES/ipset.start-stop @@ -257,7 +257,13 @@ load() { CLEAN_FILES="${CLEAN_FILES} ${mangled}" chmod 600 "${mangled}" - awk '/^(add|create) ('"${conflicts}"')/ { printf "%s ",$1; system("echo '${salt}'" $2 " | md5sum | head -c31"); $1=""; $2=""; print; next} {print}' "${merged}" > "${mangled}" + cat "${merged}" > "${mangled}" + IFS='|' + for set in ${conflicts}; do + new_name=$(echo "${salt}${set}" | md5sum | head -c31) + echo "s/^(add|create) $set /\1 $new_name /" + done | sed -i -r -f - "${mangled}" + unset IFS if ! ipset_restore "${mangled}"; then err "Failed to restore configured sets" exit 1 diff --git a/SPECS/ipset.spec b/SPECS/ipset.spec index c21d9aa..9fe8032 100644 --- a/SPECS/ipset.spec +++ b/SPECS/ipset.spec @@ -3,7 +3,7 @@ Name: ipset Version: 7.11 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Manage Linux IP sets License: GPLv2 @@ -173,6 +173,9 @@ fi * Wed Mar 15 2023 MSVSphere Packaging Team - 7.11-6 - Rebuilt for MSVSphere 9.1. +* Mon Jan 31 2022 Phil Sutter - 7.11-7 +- Fix for bad performance restoring large sets which are in use + * Mon Nov 08 2021 Phil Sutter - 7.11-6 - Sync ipset.service with RHEL8, fix the required package name