Opened 11 years ago

Closed 10 years ago

#3 closed defect (fixed)

interface setup screwed up

Reported by: andib Owned by:
Priority: major Milestone: 3 allow alternate DHCP client
Component: engine Version: 3.11
Keywords: Cc:

Description

The current code base sometimes does not correctly configure interfaces when switching profiles. It was observed that xwlan creates numerous interfaces (lan9, lan8, lan7....) instead of configuring the correct ones (lan0, lan1 in my case).

As switching profiles usually works here, I think this could be a timing issue. Usually one interface is switched off and afterwards the other interface is configured. But once I saw that both interfaces lan0 and lan1 were configured at the same time for a short period.

Change History (3)

comment:1 Changed 11 years ago by aschn

I think that behavior is caused by the given OS/2 part. From a previous
WSE I remember Christian told me to also set the prior interface down.
Even Doug Bisset has since a long time correctly working scripts for
XWLAN.

I'll probably come back with a working example. Please tell me when I
apparently missunderstood something with that.

Andreas

comment:2 Changed 11 years ago by andib

Interestingly. Currently I'm debugging the code (past 3.10) to find out, why switching from wired to WLAN does not work for me. So far I found out that configuring of the WLAN interface starts (start dhcp client in my case) when the wired interface is still up and running. dhclient configures the WLAN interface correctly and WLAN works (with latest WPA supplicant). But afterwards XWLAN reads the current routes of the wired interface and wants to set matching routes to the new WLAN interface. At this point the routes seems to screw up although the look fine with netstat -r. Afterwards the old wired interface is deleted.

I'm not sure what the correct behavior should be when switching WLAN on/off. In my case where WLAN and wired are on the same net, switching off wired before turning on WLAN does make sense. But when using DHCP XWLAN does not know in advance if both interfaces are on the same net or not. If not, there's no need (and I think it's not desired) to switch of the wired connection. Thinking about that my current problem maybe related to the 'Automatic resolve conflicts' setting.

But there are a lot of other different use cases which makes this code so complicated to test. Maybe we should try to define some sample use cases which are needed by volunteer testers as it's impossible for me alone to test all combinations. If someone has the time to setup a wiki page for that.....

comment:3 Changed 10 years ago by andib

Resolution: fixed
Status: newclosed

Ok, the current xwlan v3.12 code sets the old interface (wired) to nil even if there is an alias address set when the new interface (wireless) is up and running. Then the matching routes of old interface are deleted and added to the new interface. Afterwards alias address of old interface is set again.

Setting to nil is the only way to delete/add routes reliable so this is a necessary step which was not implemented in v3.11. v3.11 worked sometimes when dhcpd did not get an ip for the wireless interface fast enough. At least that's what I concluded from my observations.

The wrongly activation of lan9, lan8, lan7.... interfaces are not observed anymore since my changes.

Note: See TracTickets for help on using tickets.