interface MACs and LLDP neighbours do not survive save and reload #1521
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1521
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two facts a real device carries are lost on serialisation:
iface.macis absent from the serialised interface fields (engine/device.js:851-887), andfromJSONcalls_assignMacs(), so a document claiming00:1b:21:aa:bb:ccreloads as02:00:00:00:00:00.lldpis written (engine/device.js:882) andDevice.hydratehas nolldpbranch, so a neighbour table evaporates - verified:d2.lldp.size1 before save, 0 after load.Why it matters: the importer being built needs to store a real switch's MAC table and neighbour table. Neither currently has anywhere to live, and the LLDP half is the precedent that must not be repeated - a provenance record that is written and never read back.
Suggested fix: carry
macthroughserialize/hydrate(and decide what_assignMacsdoes when a MAC is already present - it must not overwrite), and add thelldpbranch tohydrate.