Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2023.1.x] gluon-core: dont fail on unset interface role #3095

Merged

Conversation

herbetom
Copy link
Contributor

In case no interface role was selected for a given interface, gluon-reconfigure currently fails with

Configuring: 021-interface-roles
/usr/bin/lua: /usr/lib/lua/gluon/util.lua:25: bad argument #1 to 'pairs' (table expected, got nil) stack traceback:
	[C]: in function '?'
	/usr/lib/lua/simple-uci.lua:22: in function 'foreach'
	./021-interface-roles:47: in main chunk
	[C]: ?

Check we actually have a role set before accessing the table.

Signed-off-by: David Bauer [email protected]
(cherry picked from commit c4d3703)


Backport of #3050

Haven't tested it (yet). Will do that once Github has created some images. But i don't expect issues.

In case no interface role was selected for a given interface,
gluon-reconfigure currently fails with

Configuring: 021-interface-roles
/usr/bin/lua: /usr/lib/lua/gluon/util.lua:25: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	[C]: in function '?'
	/usr/lib/lua/simple-uci.lua:22: in function 'foreach'
	./021-interface-roles:47: in main chunk
	[C]: ?

Check we actually have a role set before accessing the table.

Signed-off-by: David Bauer <[email protected]>
(cherry picked from commit c4d3703)
@github-actions github-actions bot added the 3. topic: package Topic: Gluon Packages label Dec 11, 2023
@blocktrron blocktrron merged commit c59d070 into freifunk-gluon:v2023.1.x Dec 11, 2023
6 checks passed
@herbetom herbetom deleted the pr-v2023.1.x-empty-role branch December 18, 2023 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. topic: package Topic: Gluon Packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants