Page MenuHomeVyOS Platform

LLDP wrong config generation for interface 'all'
Needs testing, Requires assessmentPublicBUG

Description

LLDP behaves incorrectly when used with interface 'all'.

LLDP is inactive on all interfaces by default.
If I use

delete service lldp
set service lldp
commit

LLDP becomes active on all interfaces. I'm unsure if this is what is supposed to happen, but this is not the bug yet.
If I use

delete service lldp
set service lldp interface eth1
set service lldp interface all disable
commit

LLDP is still active on eth1, though I think it should be disabled.

If I use

delete service lldp
set service lldp interface all
commit

LLDP becomes inactive on all interfaces. This should not happen.

The problem arises from different representation and missing translation of the 'all' interface in conf_mode and in lldpd config syntax.
conf_mode uses the word 'all' while lldpd config uses an asterisk '*'.

The template in vyos-1x:./src/conf_mode/lldp.py does not convert from 'all' to '*' and so lldpd is looking for an interface named 'all' which it cannot find.

The same goes for set service interface all disable. lldpd tries to disable service for the interface named 'all', which it cannot find, but leaves it enabled for any other interface.

But why does it enable lldp on all interfaces when only specifying service lldp but without any interface?
The reason lies in the default behavior of lldpd: if started without any interface specified, it services all interfaces.

PR is here https://github.com/vyos/vyos-1x/pull/213

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202002070217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change

Event Timeline

agh created this task.Feb 9 2020, 1:15 AM
agh updated the task description. (Show Details)Feb 9 2020, 1:21 AM
pasik added a subscriber: pasik.Feb 9 2020, 11:16 AM
c-po changed the task status from Open to Needs testing.Feb 9 2020, 2:15 PM
c-po assigned this task to agh.
c-po moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.