]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
link: Only print "promisc-mode" if users > 0
authorThomas Graf <tgraf@redhat.com>
Tue, 9 Oct 2012 17:58:54 +0000 (19:58 +0200)
committerThomas Graf <tgraf@redhat.com>
Tue, 9 Oct 2012 17:58:54 +0000 (19:58 +0200)
Signed-off-by: Thomas Graf <tgraf@redhat.com>
lib/route/link.c

index 4592bf0b97c7c5e9be76dcea3696b9c332c943ef..1b434014fd7776c86ba17adf03c280e0f198fd9e 100644 (file)
@@ -640,7 +640,7 @@ static void link_dump_details(struct nl_object *obj, struct nl_dump_params *p)
        if (link->ce_mask & LINK_ATTR_IFINDEX)
                nl_dump(p, "index %u ", link->l_index);
 
-       if (link->ce_mask & LINK_ATTR_PROMISCUITY)
+       if (link->ce_mask & LINK_ATTR_PROMISCUITY && link->l_promiscuity > 0)
                nl_dump(p, "promisc-mode (%u users) ", link->l_promiscuity);
 
        nl_dump(p, "\n");