]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
client: do not set VLAN tag if client did not set it
authorVincent Bernat <vincent@bernat.ch>
Wed, 29 Sep 2021 10:02:15 +0000 (12:02 +0200)
committerVincent Bernat <vincent@bernat.ch>
Wed, 29 Sep 2021 10:03:04 +0000 (12:03 +0200)
This fixes a bug where frames could be tagged with VLAN 0 after client
configuration.

src/daemon/client.c

index b4a08aae80a8ab019468558e7a474bfd88a3b094..0d0f3ea37a19ebee95c1313f27754efe772c0254 100644 (file)
@@ -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;
        }