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

FS#2372 - [netifd] error code language semantics misleads #8542

Closed
openwrt-bot opened this issue Jul 10, 2019 · 0 comments
Closed

FS#2372 - [netifd] error code language semantics misleads #8542

openwrt-bot opened this issue Jul 10, 2019 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

n8v8R:

I would have preferred to submit a patch but my coding skills are not up to speed/standard...

Trying to debug a PPPoE issue it was not possible to utilize --verbose with ifup || ifdown since it would appear not being implemented. Thus started to look at what LuCI has on display when stopping || starting the WAN iface via LuCI:

Unknown error (USER_REQUEST)

Whilst USER_REQUEST would seem logical as being manually initiated by the user the Unknown error however led me down the garden path until having traced its source

https://openwrt-devel.openwrt.narkive.com/piBGMKkc/patch-ppp-detailed-last-error-support

To my understanding

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/services/ppp/files/ppp.sh;h=b553effd889e7662f366793665c789ed0d0c0ff2;hb=refs/heads/openwrt-master#l64

*) echo "UNKNOWN_ERROR" ;;

gets tagged to any of the potential error codes (1 - 21), even to

0) echo "OK" ;;

Which could introduce some sort of confusion to a simple minded user (being me).

0) echo "OK" ;;
5) echo "USER_REQUEST" ;;

would not appear to warrant an error tag at all. And the remainder, except 21, would appear to be rather specific than to be labelled as Unknown error.

Perhaps

*) echo "UNKNOWN_ERROR" ;;

is meant to be anything else that is not covered by codes 1 - 21 but that is not how it turns out on (LuCI) display.

I would thus humbly suggest to sort non-errors from actual errors and not tag the Unknown error to any of the specific error codes. It may help others that find themselves in a similar situation.

Whilst not being part of the topic but in a way related perhaps implementing

--verbose for ifup || ifdown might go a long way in debugging connectivity issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant