[Bug 1158] New: using old session data when piping multiple commands

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Fri Jun 16 13:37:26 CEST 2017


https://bugzilla.netfilter.org/show_bug.cgi?id=1158

            Bug ID: 1158
           Summary: using old session data when piping multiple commands
           Product: ipset
           Version: unspecified
          Hardware: x86_64
                OS: Ubuntu
            Status: NEW
          Severity: minor
          Priority: P5
         Component: default
          Assignee: netfilter-buglog at lists.netfilter.org
          Reporter: dimitri.grischin at securepoint.de

I tried to pipe several commands to ipset but if one of them have a syntax
error then the following command will get the typename of the before.

What I did:

create ipset:
# ./ipset create test hash:net
# ./ipset create test_iface hash:net,iface


pipe commands:
Only the second command has a wrong syntax but the third command return an
error too.

# echo -e "add test 1.1.1.1\nadd test_iface 2.2.2.2\nadd test 3.3.3.3\n" |
./ipset -
ipset v6.32: Syntax error: Second element is missing from 2.2.2.2.
ipset v6.32: Syntax error: Second element is missing from 3.3.3.3.

# ./ipset list
Name: test
Type: hash:net
Revision: 6
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 448
References: 0
Members:
1.1.1.1

Name: test_iface
Type: hash:net,iface
Revision: 6
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 416
References: 0
Members:


Printing "setname" and "typename" in types.c:adt_type_get() shows that in the
third command "test" has the typename "hash:net,iface" instead of "hash:net".

# echo -e "add test 1.1.1.1\nadd test_iface 2.2.2.2\nadd test 3.3.3.3\n" |
./ipset -
ipset> setname: {test}
typename: {hash:net}
ipset> setname: {test_iface}
typename: {hash:net,iface}
ipset v6.32: Syntax error: Second element is missing from 2.2.2.2.
ipset> setname: {test}
typename: {hash:net,iface}
ipset v6.32: Syntax error: Second element is missing from 3.3.3.3.


# ./ipset -v
ipset v6.32, protocol version: 6

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20170616/687cee39/attachment.html>


More information about the netfilter-buglog mailing list