[Bug 1918936] Re: ipset does NSS lookups even if ports are numeric
Launchpad Bug Tracker
1918936 at bugs.launchpad.net
Tue Dec 7 18:48:31 UTC 2021
This bug was fixed in the package ipset - 7.10-1ubuntu0.21.10.1
---------------
ipset (7.10-1ubuntu0.21.10.1) impish; urgency=medium
* d/p/lp-1918936-{fix-p,P}arse-port-before-trying-by-service-name.patch:
speed up numeric port adds (LP: #1918936)
-- Christian Ehrhardt <christian.ehrhardt at canonical.com> Thu, 25 Nov
2021 09:47:36 +0000
** Changed in: ipset (Ubuntu Impish)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1918936
Title:
ipset does NSS lookups even if ports are numeric
Status in ipset package in Ubuntu:
Fix Released
Status in ipset source package in Bionic:
Invalid
Status in ipset source package in Focal:
Fix Released
Status in ipset source package in Groovy:
Won't Fix
Status in ipset source package in Hirsute:
Fix Released
Status in ipset source package in Impish:
Fix Released
Status in ipset source package in Jammy:
Fix Released
Bug description:
[Impact]
A change included ipset 6.37 as a performance regression as all ip set rule incur a getprotocolbyname lookup, irrespective of whether the name of the protocol or the actual port number is specified in the set configuration. For large sets this can double the speed of applying changes to ipset tables.
[Test Plan]
# Create a suitable large set of data to restore to the ipset
for x in `seq 1 7`; do for y in `seq 1 254`; do for z in `seq 1 254`; do echo "add test 10.1.1.0/21,80,150.$x.$y.$z/32" >> whitelist-ipv4 ;done; done; done
# Destroy,create, restore
sudo ipset destroy test
sudo ipset create test hash:net,port,net hashsize 4096 maxelem 786432
time sudo ipset restore < ./whitelist-ipv4
Large reduction in time taken to restore the ipset (32s-> 5s on an 8
core machine).
[Where problems could occur]
The original patch to resolve this issue did introduce another bug which as subsequently been fixed as well (and is included in the updated packages).
If the fix introduces issues its likely that iptable rules making use
of ipset groups will start to fail in some way - probably rejecting
traffic or suchlike.
[Other Info]
[Original Bug Report]
Hi,
Do you think we could get
https://git.netfilter.org/ipset/commit/?id=dbeb20a667e82e4efb8b26b24a0ec641dab5c857
SRUed to 20.04 ?
This divides our ipset loading time by ~2 (from ~60s to ~25s).
Thanks
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ipset/+bug/1918936/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list