networkd-link: Receive LLDP on Bridge slaves not master (#5995)

LLDP should be received on bridge slaves as they're the entities
directly connected to a peer. Receiving LLDP on the bridge device makes
little sense, Linux by default even filters out LLDP going onto the
bridge device.

Flip the current logic, receive LLDP on bridge slaves don't listen for
them on the bridge itself.
This commit is contained in:
sjoerd-ccu 2017-05-23 09:10:59 +02:00 committed by Lennart Poettering
parent 09d97dfb75
commit 764febc23e
1 changed files with 4 additions and 1 deletions

View File

@ -141,7 +141,10 @@ static bool link_lldp_rx_enabled(Link *link) {
if (!link->network)
return false;
if (link->network->bridge)
/* LLDP should be handled on bridge slaves as those have a direct
* connection to their peers not on the bridge master. Linux doesn't
* even (by default) forward lldp packets to the bridge master.*/
if (streq_ptr("bridge", link->kind))
return false;
return link->network->lldp_mode != LLDP_MODE_NO;