From: Vincent Bernat Date: Wed, 29 Sep 2021 10:02:15 +0000 (+0200) Subject: client: do not set VLAN tag if client did not set it X-Git-Tag: 1.0.13~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261afbe371ab316a4bf710338f6d9183a01e083f;p=thirdparty%2Flldpd.git client: do not set VLAN tag if client did not set it This fixes a bug where frames could be tagged with VLAN 0 after client configuration. --- diff --git a/src/daemon/client.c b/src/daemon/client.c index b4a08aae..0d0f3ea3 100644 --- a/src/daemon/client.c +++ b/src/daemon/client.c @@ -390,7 +390,7 @@ _client_handle_set_port(struct lldpd *cfg, port->p_disable_rx = port->p_disable_tx = 1; break; } - if (set->vlan_tx_enabled >= -1) { + if (set->vlan_tx_enabled > -1) { port->p_vlan_tx_enabled = set->vlan_tx_enabled; port->p_vlan_tx_tag = set->vlan_tx_tag; }