From 261afbe371ab316a4bf710338f6d9183a01e083f Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 29 Sep 2021 12:02:15 +0200 Subject: [PATCH] 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. --- src/daemon/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5