bugzilla-daemon at netfilter.org
2013-Aug-13  00:41 UTC
[Bug 843] New: ipset swap doesn't behave as expected
https://bugzilla.netfilter.org/show_bug.cgi?id=843
           Summary: ipset swap doesn't behave as expected
           Product: ipset
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: default
        AssignedTo: netfilter-buglog at lists.netfilter.org
        ReportedBy: quentin at armitage.org.uk
   Estimated Hours: 0.0
The ipset man page says the following:
       w, swap SETNAME-FROM SETNAME-TO
              Swap  the  content  of  two  sets, or in another words, exchange
the name of two sets. The referred sets must
              exist and identical type of sets can be swapped only.
Actually, ipset is more flexible and allows some compatible set types to be
swapped, e.g. a hash:ip,port and a hash:net,port can be swapped.
It might be worth changing the man page to change "identical type" to
"compatible types".
However, the following, which on the face of it appears reasonable, fails:
# ipset create foo hash:ip
# ipset create bar bitmap:ip range 0.0.0.0/24
# ipset swap foo bar
ipset v6.19: The sets cannot be swapped: they type does not match.
(note there is a typo here too, "they" should be "their",
and it should really
read "their types do not match")
Finally, the following succeeds, which doesn't seem to make sense (but see
bz#842):
# ipset create foo hash:ip family inet
# ipset create foo6 hash:ip family inet6
# ipset swap foo foo6
especially since foo and foo6 can already be referenced by iptables/ip6tables
rules.
-- 
Configure bugmail: https://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
bugzilla-daemon at netfilter.org
2013-Aug-14  14:13 UTC
[Bug 843] ipset swap doesn't behave as expected
https://bugzilla.netfilter.org/show_bug.cgi?id=843
Jozsef Kadlecsik <kadlec at netfilter.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kadlec at netfilter.org
         Resolution|                            |FIXED
--- Comment #1 from Jozsef Kadlecsik <kadlec at netfilter.org> 2013-08-14
16:13:26 CEST ---
The issues are fixed in three separate patches in the git tree, thanks!
-- 
Configure bugmail: https://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
Seemingly Similar Threads
- [Bug 842] New: Addition of iptables rule referencing an ipset of the wrong address family does not fail
- [Bug 838] New: ipset add foo syslog fails for bitmap:port
- [Bug 841] New: Specifying netmask option when creating ipv6 hash:ip is inconsistent
- [Bug 844] New: Can set apparently invalid netmask for hash:ip
- [Bug 1750] New: 'ipset save' does not save in format loadable by systemd (it saves in 'ipset list' format)