The API is a configuration door too, and it asks the parser instead of the rule #1413
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1413
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?
The console has been taught, one rule at a time, what an address is (#1411) and what a mask is (#1249). The HTTP surface edits a port directly -
POST /api/topologies/:name/interfaces/:device/:portwith{ ip, mask }- and it asked the parsers (ipToInt,maskToInt) instead of the rules. Measured against a running server:The first is the one that matters: the board contained a configuration that cannot be replayed from its own configuration.
POST /loadwas the third door.Device.hydrate()copies the port document through - right, it is the lab that was saved - but the address is the one field the engine has rules about, so a hand-edited or older document put an impossible mask into state. And when the address itself was impossible the whole load answered400 Invalid IPv4 address: 300.1.1.1with the board never replaced, so one bad port cost the operator the rest of the lab.What should be true