]> git.ipfire.org Git - thirdparty/lldpd.git/blobdiff - src/daemon/event.c
marshal: don't marshal the list of chassis
[thirdparty/lldpd.git] / src / daemon / event.c
index ca66a2ed454241540a3daca2cac441e0f0ec4f32..6bfeb10ccdcde8d0876ef5147654588524a26ce5 100644 (file)
@@ -247,24 +247,16 @@ levent_ctl_notify(char *ifname, int state, struct lldpd_port *neighbor)
 
                if (output == NULL) {
                        /* Ugly hack: we don't want to transmit a list of
-                        * chassis or a list of ports. We patch the chassis and
-                        * the port to avoid this. */
-                       TAILQ_ENTRY(lldpd_chassis) backup_c_entries;
+                        * ports. We patch the port to avoid this. */
                        TAILQ_ENTRY(lldpd_port) backup_p_entries;
                        memcpy(&backup_p_entries, &neighbor->p_entries,
                            sizeof(backup_p_entries));
-                       memcpy(&backup_c_entries, &neighbor->p_chassis->c_entries,
-                           sizeof(backup_c_entries));
                        memset(&neighbor->p_entries, 0,
                            sizeof(backup_p_entries));
-                       memset(&neighbor->p_chassis->c_entries, 0,
-                           sizeof(backup_c_entries));
                        output_len = marshal_serialize(lldpd_neighbor_change,
                            &neigh, &output);
                        memcpy(&neighbor->p_entries, &backup_p_entries,
                            sizeof(backup_p_entries));
-                       memcpy(&neighbor->p_chassis->c_entries, &backup_c_entries,
-                           sizeof(backup_c_entries));
 
                        if (output_len <= 0) {
                                LLOG_WARNX("unable to serialize changed neighbor");