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

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.

Quoted Text

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.

I don't understand what is the problem with it. There is more common command set service lldp interface all disable says that we should not use lldp on all interfaces. And more specific command set service lldp interface eth1 says that we should use lldp on eth1 interface. I don't see any problems or collision with it. On the contrary it is reasonable. The more specific command overrides more common command. It is approach of any configurations. VyOS team, I didn't understand why you agreed with @agh and decided to change this behavior.

Quoted Text

If I use

delete service lldp
set service lldp interface all
commit

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

There is no questions. It is reasonable remark.

Anyway, it was tested. Everything works as requested