]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
cdp: send native VLAN only with CDPv2
authorVincent Bernat <bernat@luffy.cx>
Sat, 17 Dec 2011 16:14:42 +0000 (17:14 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 17 Dec 2011 16:14:42 +0000 (17:14 +0100)
src/cdp.c

index 61ba41d0396b70b0d7497697f54a6f4294f65872..4d873534bf924b9d4894a5f039c81d878aa5e6ca 100644 (file)
--- a/src/cdp.c
+++ b/src/cdp.c
@@ -147,7 +147,7 @@ cdp_send(struct lldpd *global,
 
        /* Native VLAN */
 #ifdef ENABLE_DOT1
-       if (hardware->h_lport.p_pvid != 0) {
+       if (version >=2 && hardware->h_lport.p_pvid != 0) {
                if (!(
                      POKE_START_CDP_TLV(CDP_TLV_NATIVEVLAN) &&
                      POKE_UINT16(hardware->h_lport.p_pvid) &&