#include "networkd-network.h"
#include "string-table.h"
#include "string-util.h"
+#include "strv.h"
#include "tmpfile-util.h"
DEFINE_CONFIG_PARSE_ENUM(config_parse_lldp_mode, lldp_mode, LLDPMode, "Failed to parse LLDP= setting.");
if (!link->network)
return false;
- /* 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))
+ /* LLDP should be handled on bridge and bond slaves as those have a direct connection to their peers,
+ * not on the bridge/bond master. Linux doesn't even (by default) forward lldp packets to the bridge
+ * master.*/
+ if (link->kind && STR_IN_SET(link->kind, "bridge", "bond"))
return false;
return link->network->lldp_mode != LLDP_MODE_NO;
#include <net/if_arp.h>
#include "alloc-util.h"
-#include "escape.h"
#include "env-file.h"
+#include "escape.h"
#include "fd-util.h"
#include "hostname-util.h"
#include "missing_network.h"
#include "random-util.h"
#include "socket-util.h"
#include "string-util.h"
+#include "strv.h"
#include "unaligned.h"
#include "web-util.h"
if (!link->network)
return false;
+ if (link->kind && STR_IN_SET(link->kind, "bridge", "bond"))
+ return false;
+
return link->network->lldp_emit != LLDP_EMIT_NO;
}