Repository navigation
autoconfig: validate the static IP settings - #194
Open
igorpecovnik wants to merge 1 commit into
Open
igorpecovnik wants to merge 1 commit into
igorpecovnik wants to merge 1 commit into
Conversation
A static address that can't work leaves a headless board unreachable with no hint why. A forum user entered 192.168.1.255/24, the subnet's broadcast address; the imager accepted it and first boot never came up on the network. Check the static IP block as a whole and flag it inline, like the URL fields: a well-formed IPv4 address and contiguous netmask, an address that is a usable host (not the network or broadcast address of its subnet; /31 and /32 are exempt), a gateway inside that subnet and not the device itself, and DNS servers as IPv4 addresses separated by spaces or commas. English strings only; the nightly locale sync translates them. Signed-off-by: Igor Pecovnik <igor@armbian.com>
🧪 Test BuildsVersion:
ℹ️ About these builds
|
Member
|
Thanks Igor, catching the broadcast address is a good one. Found one gap: a space at the end of the IP. The check ignores spaces, so Simplest fix is to flag the trailing space in the check. Trimming the value before it's saved works too. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A static address that can't work leaves a headless board unreachable, with no hint why. A forum user set everything else up correctly (Ethernet off, Wi-Fi on, static IP) but entered
192.168.1.255/255.255.255.0, the subnet's broadcast address. The imager accepted it, and the board never came up on the network.Change: the static IP block is checked as a whole and errors show inline, like the existing URL fields (
Field error=+TextInput invalid). Saving isn't blocked, same as the URL checks./31and/32exempt)The subnet maths uses arithmetic, not JS bitwise ops, which are signed 32-bit and break above
127.x.x.x.The new strings are in
en.jsononly; the nightlydata-sync-localesjob translates them.Checked by running the validator on its own (node, types stripped): the forum case →
ipNotHost;.0/24and.255.255/16→ipNotHost;.255/23, a/31and200.x/24→ OK; bad mask, gateway outside the subnet, gateway = IP,300octet, non-IP DNS → each flagged; empty fields → nothing. Not built or clicked through in the app: there's no Tauri/Node toolchain here, so please let CI build it.Related: armbian/build#10840 (unattended first login; also fixes the
8.8.8.8, 1.1.1.1DNS form the placeholder suggests, which previously produced invalid netplan YAML) · #193