Modify

Opened 4 years ago

Closed 4 years ago

#15399 closed defect (fixed)

netifd issue when changing from 3g/ppp to dhcp on WAN interface

Reported by: James Owned by: developers
Priority: normal Milestone: Netifd Implementation
Component: packages Version: Trunk
Keywords: netifd Cc:

Description

We’re recently come up against a problem whereby when you switch protocol to 3G/PPPoE, and then switch back to DHCP on the WAN interface, netifd is failing to bring up the WAN interface.

I’ve tracked it down to a line inside /lib/netifd/dhcp.script:

proto_init_update "*" 1

The problem here is that the * means that the interface name is not properly set, so for some reason it does not add the ip address, netmask, gateway or route to the correct WAN interface.

If I manually set the interface name in that line, e.g.:

proto_init_update “eth1” 1

All works fine.

Can you advise what the * is used for, and why it’s not the real interface name? Also, this problem only occurs when going back to DHCP from a 3G/PPPoE connection (that successfully dialled up and connected), so maybe something that happens during the PPP connection is stopping the * from being usable when you switch back to DHCP?

For the moment I am using this to get around the problem:

local realif=$(uci get network.wan.ifname)
proto_init_update "$realif" 1

But I don’t like hardcoding a UCI call in there when it should work by default.

Any idea why this is happening?

Thank you very much

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by nbd

please try this netifd patch: http://nbd.name/netifd-proto.patch

comment:2 Changed 4 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

fixed in r40384

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.