* Fix:
+ Update seccomp rules for newer kernel/libc (#488)
+ Correctly handle an interface whose index has changed (#490)
+ + Don't send VLANs when there are too many (#510)
lldpd (1.0.13)
* Fix:
u_int8_t p_id_subtype,
char *p_id,
int p_id_len,
- int shutdown)
+ int shutdown,
+ int without_vlans)
{
struct lldpd_port *port;
struct lldpd_chassis *chassis;
u_int8_t *packet, *pos, *tlv;
struct lldpd_mgmt *mgmt;
int proto;
+ int vlans = 0;
u_int8_t mcastaddr_regular[] = LLDP_ADDR_NEAREST_BRIDGE;
u_int8_t mcastaddr_nontpmr[] = LLDP_ADDR_NEAREST_NONTPMR_BRIDGE;
}
/* VLANs */
TAILQ_FOREACH(vlan, &port->p_vlans, v_entries) {
+ vlans++;
if (!(
POKE_START_LLDP_TLV(LLDP_TLV_ORG) &&
POKE_BYTES(dot1, sizeof(dot1)) &&
return 0;
toobig:
- log_info("lldp", "Cannot send LLDP packet for %s, too big message", hardware->h_ifname);
free(packet);
+ if (vlans > 0 && !without_vlans) {
+ /* Retry without VLANs */
+ return _lldp_send(global,
+ hardware,
+ c_id_subtype,
+ c_id,
+ c_id_len,
+ p_id_subtype,
+ p_id,
+ p_id_len,
+ shutdown,
+ 1);
+ }
+ log_info("lldp", "Cannot send LLDP packet for %s, too big message", hardware->h_ifname);
return E2BIG;
}
hardware->h_lport_previous_id_subtype,
hardware->h_lport_previous_id,
hardware->h_lport_previous_id_len,
- 1);
+ 1, 0);
}
int
port->p_id_subtype,
port->p_id,
port->p_id_len,
- 0)) != 0)
+ 0, 0)) != 0)
return ret;
/* Record current chassis and port ID */
assert out['lldp.eth0.vlan.vlan-id'] == \
['100', '200', '300', '4000']
+ def test_too_many_vlans(self, lldpd1, lldpd, lldpcli, namespaces, links):
+ with namespaces(2):
+ for v in range(100, 1000):
+ links.vlan('vlan{}'.format(v), v, 'eth1')
+ lldpd()
+ with namespaces(1):
+ out = lldpcli("-f", "keyvalue", "show", "neighbors", "details")
+ assert 'lldp.eth0.vlan' not in out
+
# TODO: PI and PPVID (but lldpd doesn't know how to generate them)