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#2439 - comgt hotplug mishandles "bind" event #7254

Open
openwrt-bot opened this issue Aug 12, 2019 · 1 comment
Open

FS#2439 - comgt hotplug mishandles "bind" event #7254

openwrt-bot opened this issue Aug 12, 2019 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

andres-h:

My 3g modem goes "unavailable" shortly after being plugged in. Even though the device /dev/ttyUSB* exists, "ifup" has no effect and "ifstatus" shows:

{
"up": false,
"pending": false,
"available": false,
"autostart": true,
"dynamic": false,
"proto": "3g",
"data": {

    },
    "errors": [
            {
                    "subsystem": "interface",
                    "code": "NO_DEVICE"
            }
    ]

}

I found that this is caused by incorrect logic at

if [ "$ACTION" = add ]; then

Namely, the "add" event is followed by "bind" event, which causes:

proto_set_available "$cfg" 0

And BTW, isn't there a race condition with hotplug at

[ -e "$device" ] || {
?

@openwrt-bot
Copy link
Author

stefanct:

I just stumbled upon this report... the main problem might have been fixed by 4821ff0.

No idea about the other invocation of proto_set_available ("race"). It's still there in master but I don't know if that's a problem at all.

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