From: Vincent Bernat Date: Sat, 17 Dec 2011 16:13:42 +0000 (+0100) Subject: cdp: send native VLAN TLV X-Git-Tag: 0.5.6~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a19e9ea23f5ea08889f46c49cab3f5421342863;p=thirdparty%2Flldpd.git cdp: send native VLAN TLV --- diff --git a/CHANGELOG b/CHANGELOG index a6816e3b..4e2dc0da 100644 --- 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: diff --git a/src/cdp.c b/src/cdp.c index f71a36f3..61ba41d0 100644 --- 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 (!(