-
Notifications
You must be signed in to change notification settings - Fork 10
smartcontract: enforce 9000-byte MTU on links and device interfaces #3411
Copy link
Copy link
Closed
Description
Summary
Change the enforced MTU for links and non-CYOA/non-DIA device interfaces from 2048 to 9000 bytes. CYOA/DIA interfaces remain at 1500. Add onchain validation using the existing InvalidMtu error code, and make the CLI --mtu flag optional with correct defaults.
Motivation
The network should use jumbo frames (9000 bytes) by default for all fabric-facing links and interfaces. The previous 2048-byte MTU was a placeholder that does not reflect the intended production configuration. Enforcing this at both the CLI and onchain level prevents misconfigured links and interfaces from being registered.
Changes
Onchain (smartcontract program)
- Validate MTU in link create/update processors: must be 9000, else return
InvalidMtu(error 46) - Validate MTU in device interface create/update processors: must be 9000 for non-CYOA/non-DIA interfaces, 1500 for CYOA/DIA interfaces
CLI
doublezero link create wan/dzx:--mtubecomes optional, defaults to 9000, rejects other valuesdoublezero link update:--mtuvalidates 9000 if provideddoublezero device interface create: defaults to 9000 (non-CYOA/DIA) or 1500 (CYOA/DIA), rejects other valuesdoublezero device interface update: same validation rules- Remove
validate_parse_mturange validator (no longer meaningful)
Tests
- Update all test fixtures from 2048/1500 to 9000 for non-CYOA interfaces and links
- Add onchain tests for
InvalidMturejection - Update test script (
start-test.sh) MTU values
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels