From 2a19e9ea23f5ea08889f46c49cab3f5421342863 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 17 Dec 2011 17:13:42 +0100 Subject: [PATCH] cdp: send native VLAN TLV --- CHANGELOG | 2 +- src/cdp.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 (!( -- 2.39.5