"ipset -quiet list [set_name]" should not output.

Bug #1209347 reported by Richard Michael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipset (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

(ubuntu) ~ lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04
(ubuntu) ~ apt-cache policy ipset
ipset:
  Installed: 6.11-2
  Candidate: 6.11-2
  Version table:
 *** 6.11-2 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status

The ipset man page indicates the '-quiet' option should "suppress any output to stdout and stderr".

But,

root@ubuntu:~# ipset -quiet list
Name: my-list
Type: hash:ip
Header: family inet hashsize 1024 maxelem 65536
Size in memory: 8276
References: 0
Members:

This makes scripts inconsistent/ugly because 'list' must redirect stdout/err, while '-quiet' works with other commands.

Example,

if ipset list my_list > /dev/null 2>&1 ; then # Because "ipset -quiet list mylist" is not quiet.
  ipset -quiet flush my_list
fi

Revision history for this message
James Page (james-page) wrote :

I see what you are saying, and this behaviour persists to the current release (artful).

However by using the 'list' operator, your kinda always going to get some output as that's the action requested.

I'm going to mark this as a Won't Fix for Ubuntu as I'd not want to change behaviour of ipset for Ubuntu alone; if you feel this should be changed, or maybe a new operator be introduced to check for the existence of a set then please report a bug to the upstream project (https://bugzilla.netfilter.org/).

Changed in ipset (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.