Bug 211617

Summary: `bsdinstall` looping on Subnet Mask
Product: Base System Reporter: kellytk+freebsdbugzilla
Component: binAssignee: freebsd-sysinstall (Nobody) <sysinstall>
Status: New ---    
Severity: Affects Some People CC: allanjude, michelle, pierre
Priority: --- Keywords: install
Version: 10.3-RELEASE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
0001-netconfig-report-failures-to-save-or-apply-configura.patch none

Description kellytk+freebsdbugzilla 2016-08-06 00:39:37 UTC
`bsdinstall` loops on the Network Configuration dialog for static network interface configuration (IPv4), if the following network information is provided:

* IP Address 10.0.0.200
* Subnet Mask 10.0.0.0/24  # 255.255.255.0 passes
* Default Router 10.0.0.1

While the "Subnet Mask" label is correct [1] it may be a helpful addition to `bsdinstall` to strip the mask from network blocks in CIDR notation.

[1] 10.0.0.0/24 is both network address and mask in CIDR notation.
Comment 1 kellytk+freebsdbugzilla 2016-08-06 02:15:39 UTC
Alternatively to stripping and using the mask from a network block in CIDR notation provided incorrectly to the Subnet Mask field, an error message could be presented.
Comment 2 Michelle Sullivan 2016-08-06 10:29:18 UTC
(In reply to kellytk+freebsdbugzilla from comment #0)

----
While the "Subnet Mask" label is correct [1] it may be a helpful addition to `bsdinstall` to strip the mask from network blocks in CIDR notation.
----

Sorry as an entry the 'Subnet Mask' is not correct, putting in '24' might be, but:

10.0.0.0/24 is a network and subnet mask, where the dialog requests subnet mask only.

Tha said:

(In reply to kellytk+freebsdbugzilla from comment #1)

----
provided incorrectly to the Subnet Mask field, an error message could be presented.
----

I would rephrase that to 'an error message *should* be presented as its an invalid input.
Comment 3 Allan Jude freebsd_committer freebsd_triage 2016-08-08 14:24:44 UTC
There is no such intelligence, the data is passed directly to ifconfig, and when ifconfig files, it redisplays the dialog. I'll look at improving it.
Comment 4 Pierre Pronchery 2023-07-26 13:29:51 UTC
Created attachment 243627 [details]
0001-netconfig-report-failures-to-save-or-apply-configura.patch

I have just had a look into this. This patch:

* provides error messages when failing to save the network configuration
* detects failures when applying manual IPv4 or IPv6 configuration
* fixes setting the default IPv4 or IPv6 route.

There is still room for improvement: the actual error should be provided to the user instead of generic messages.
Comment 5 Pierre Pronchery 2023-07-26 17:55:45 UTC
This looks like a duplicate of bug #182601.

I think the original submitter of that bug was encountering an error while setting up the network, in which case the installer simply loops back to the network configuration dialog (as described here).