Opened 14 months ago

Closed 11 months ago

Last modified 11 months ago

#14626 closed bug (invalid)

network device config misalignment

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Network Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

The coupling of /boot/system/settings/network/interfaces is too loose to the network card.

/boot/system/settings/network/interfaces:

interface    /dev/net/emulex_oce/0 {
    address inet {
        address 192.168.254.200
        mask 255.255.255.0
    }
}

Reboot with only one network card (blacklist emulex_oce for example): /dev/net/rtl81xx/0

The device /dev/net/rtl81xx/0 is configured with 192.168.254.200 instead of being unconfigured.

Change History (4)

comment:1 by kallisti5, 14 months ago

Component: Drivers/Network/emulex_oceKits/Network Kit
Owner: changed from waddlesplash to nobody

comment:3 by kallisti5, 11 months ago

I'm not 100% sure that something doesn't come in later and call SetName, but the NULL check at https://git.haiku-os.org/haiku/tree/src/kits/network/libnetapi/NetworkSettings.cpp#n585 means it's a big unknown.

I think the NULL check is there as a generic "if no NIC name, apply static IP to the first nic", however that creates a lot of unknown behavior.

If someone swaps a NIC, we really should start ignoring the configuration for it since with multiple NIC's things get a bit complex.

Maybe that NULL check should be returned as B_ENTRY_NOT_FOUND?

comment:4 by axeld, 11 months ago

Resolution: invalid
Status: newclosed

That's actually intended behavior. There is no problem in NetworkSettings, the logic for this sits in the net_server, it's even documented now :-)

I don't really see a reason to change this, but if you see one, please elaborate.

On the plus side, you can boot the same Haiku installation with static IP settings from different hardware, or even from a VM.

On the other side, it's unexpected. The need for specific settings might be rare enough that this logic is too much.

Maybe others can chime in and voice their opinion, too.

Last edited 11 months ago by axeld (previous) (diff)
Note: See TracTickets for help on using tickets.