Skip to content

lime-config fails if the device doesn't have a network device named 'eth0' #1253

@a-gave

Description

@a-gave

Found trying to run libremesh on a tplink-eap650-outdoor-v1 which have a physical interface named 'lan'

The device is currently unsupported (see openwrt/openwrt#23056) but the issue should be valid for other routers without a network device named 'eth0' like the tplink-eap610-outdoor-v1 which is currently supported.

Details:
When configuring the network lime-config expects that lime-autogen contains a config network.primary_interface else it will use 'eth0'
If eth0 is not present the first lime-config fails to run.
The strange fact is that it is not sufficient to modify the lime-defaults network.primary_interface to 'auto' or 'lan'
The workaround I found was to copy also the file lime-defaults to lime-autogen.
It seems that the function 'network.primary_interface()' requires a lime-autogen with a config network.primary_interface to be present before it's first run.
The device remains in a sort of bricked state, recoverable via serial interface.
I'll add some more details and the error log once I reproduce the issue.

local ifname = config.get("network", "primary_interface", "eth0")

function network.primary_interface()
	local ifname = config.get("network", "primary_interface", "eth0")
	if ifname == "auto" then
		local board = utils.getBoardAsTable()
		ifname = board['network']['lan']['device']
	end
	network.assert_interface_exists(ifname)
	return ifname
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions