Opened 9 years ago

Closed 5 months ago

#6423 closed bug (fixed)

auto-configuration of network interface does not work automatically if another interface is listed in the settings file

Reported by: stippi Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/net_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #7475, #12109, #14627
Has a Patch: no Platform: All

Description

Haiku revision is hrev37183, so this bug may have been fixed meanwhile, but I didn't read anything in the commits to this effect.

I have two network interfaces with Haiku drivers in my laptop. One is a WiFi device, the other is wired. When I did not use the Network preflet yet on a fresh installation, the wired device is auto-configured and used. I believe the WiFi is also automatically used after using setwep on the command line and when there is no wired connection. However after I used the Network preflet for the first time, it generated an "interface" settings file which includes some configuration for the WiFi adapter. The auto-configuring wired adapter is not mentioned. Looking into the code of the Network preflet, this is intentional. However, the wired adapter is not anymore auto-configured after booting. I have to manually issue "ifconfig /dev/net/ipro1000/0 auto-config" on the command line after each boot to get working network.

Change History (11)

comment:1 Changed 9 years ago by stippi

Indeed, after removing the "interface" settings file, I have automatically working network again after the next boot. So my suspicion seems correct that the issue is as mentioned in the ticket title.

comment:2 Changed 9 years ago by phoudoin

I think NetServer::_BringUpInterfaces() is the guilty one here: it first configure interfaces defined in the settings file, and then, if there is no interface name starting by /dev/net yet (which is a wrong), and only then it create & configure interface for the other(s) device(s) found under /dev/net. Will see if I can fix that.

Meanwhile, you could add yourself the wired interface to the interfaces file, to avoid that manual ifconfig after each boot if you want:

interface /dev/net/yourwireddriver/0 {

address {

auto_config true

}

}

comment:3 Changed 6 years ago by diver

Owner: changed from axeld to mmlr
Status: newassigned
<mmlr_thinkpad> yes, that's a known bug
<mmlr_thinkpad> or at least it's known to me
<mmlr_thinkpad> when configuring an interface with non-auto 
<mmlr_thinkpad> settings it will write those settings to /boot/common/settings/network/interfaces
<mmlr_thinkpad> it will not include the interfaces that are set to auto
<mmlr_thinkpad> when the net_server starts and does find 
<mmlr_thinkpad> settings/network/interfaces, it will only enumerate the interfaces listed there
<mmlr_thinkpad> when the file is not present then it will
just enumerate all of them and initialize them to auto
<mmlr_thinkpad> hence the auto interfaces getting droped as
soon as you configure one

comment:4 Changed 6 years ago by diver

Blocking: 7475 added

comment:5 Changed 4 years ago by diver

Still here in hrev49636.

comment:6 Changed 10 months ago by waddlesplash

Blocking: 12109 added

comment:7 Changed 5 months ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Fix merged in hrev52661.

comment:8 Changed 5 months ago by waddlesplash

Blocking: 14627 added

comment:9 Changed 5 months ago by axeld

Resolution: fixed
Status: closedreopened

I'm working on a fix.

comment:10 Changed 5 months ago by axeld

Owner: changed from mmlr to axeld
Status: reopenedin-progress

comment:11 Changed 5 months ago by axeld

Resolution: fixed
Status: in-progressclosed

Fixed in hrev52670.

Note: See TracTickets for help on using tickets.