summaryrefslogtreecommitdiffstats
path: root/lib/session.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-06 22:05:10 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-05-06 22:05:10 +0200
commit896447190b8ced40819cb91250db00bc38423bbf (patch)
treee0946f859964f726502811fe72609dfcbb12f1a7 /lib/session.c
parenta7c1a5a819b4d15ff76833aa3df144ecae3d16ce (diff)
Ignore -n flag (list just setnames) when sets are to be saved
Diffstat (limited to 'lib/session.c')
-rw-r--r--lib/session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/session.c b/lib/session.c
index c55c311..59405d4 100644
--- a/lib/session.c
+++ b/lib/session.c
@@ -952,7 +952,8 @@ callback_list(struct ipset_session *session, struct nlattr *nla[],
ATTR2DATA(session, nla, IPSET_ATTR_SETNAME, cmd_attrs);
D("setname %s", ipset_data_setname(data));
- if (session->envopts & IPSET_ENV_LIST_SETNAME) {
+ if (session->envopts & IPSET_ENV_LIST_SETNAME &&
+ session->mode != IPSET_LIST_SAVE) {
if (session->mode == IPSET_LIST_XML)
safe_snprintf(session, "<ipset name=\"%s\"/>\n",
ipset_data_setname(data));