]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
[lldpctl] Fix PVID value when displaying VLANs.
authorVincent Bernat <bernat@luffy.cx>
Thu, 22 Sep 2011 20:17:16 +0000 (22:17 +0200)
committerVincent Bernat <bernat@luffy.cx>
Thu, 22 Sep 2011 20:17:16 +0000 (22:17 +0200)
Once the PVID of a port was found, subsequent VLAN were considered as PVID.

src/display.c

index 7586a9a9b1cc045a40c248a26265e5a004763c0a..97f26332dbba68321cdbbcc9651ddaad3ad36847 100644 (file)
@@ -1040,7 +1040,7 @@ display_vlans(struct writer *w, struct lldpd_port *port)
 
                tag_start(w, "vlan", "VLAN");
                tag_attr(w, "vlan-id", "", u2str(vlan->v_vid));
-               if (foundpvid)
+               if (port->p_pvid == vlan->v_vid)
                        tag_attr(w, "pvid", "pvid", "yes");
                tag_data(w, vlan->v_name);
                tag_end(w);