conn->state_data[0] = 0;
}
if (conn->state == state_send &&
- (state_data == NULL || !strncmp(conn->state_data, state_data, sizeof(conn->state_data)))) {
+ (state_data == NULL || !strncmp(conn->state_data, state_data, sizeof(conn->state_data) - 1))) {
/* We need to send the currently built message */
rc = lldpctl_send(conn);
if (rc < 0)
conn->state = state_recv;
}
if (conn->state == state_recv &&
- (state_data == NULL || !strncmp(conn->state_data, state_data, sizeof(conn->state_data)))) {
+ (state_data == NULL || !strncmp(conn->state_data, state_data, sizeof(conn->state_data) - 1))) {
/* We need to receive the answer */
while ((rc = ctl_msg_recv_unserialized(&conn->input_buffer,
&conn->input_buffer_len,
("configure system interface promiscuous", "iface-promisc", "yes"),
("configure system bond-slave-src-mac-type fixed",
"bond-slave-src-mac-type", "fixed"),
+ ("configure system description "
+ "1234567890123456789012345678901234567890"
+ "1234567890123456789012345678901234567890",
+ "description",
+ "1234567890123456789012345678901234567890"
+ "1234567890123456789012345678901234567890"),
("configure lldp agent-type nearest-customer-bridge",
"lldp-agent-type", "nearest customer bridge")])
def test_config_change(lldpd1, lldpcli, namespaces, command, name, expected):