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

index a6816e3b1250be34af01a1684c49e4b8e1579095..4e2dc0da500c36d31055fa042459f2b96e287374 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
 lldpd (0.5.6)
   * Features:
-    + Parse CDP native VLAN TLV.
+    + Send and receive native VLAN TLV with CDP
 
 lldpd (0.5.5)
   * Features:
index f71a36f3bb30bf6589a8ae85f10e64e83d0fe340..61ba41d0396b70b0d7497697f54a6f4294f65872 100644 (file)
--- a/src/cdp.c
+++ b/src/cdp.c
@@ -144,6 +144,17 @@ cdp_send(struct lldpd *global,
                        goto toobig;
 #endif
        }
+
+       /* Native VLAN */
+#ifdef ENABLE_DOT1
+       if (hardware->h_lport.p_pvid != 0) {
+               if (!(
+                     POKE_START_CDP_TLV(CDP_TLV_NATIVEVLAN) &&
+                     POKE_UINT16(hardware->h_lport.p_pvid) &&
+                     POKE_END_CDP_TLV))
+                       goto toobig;
+       }
+#endif
                
        /* Software version */
        if (!(