Project

General

Profile

Bug #927

3G modem rendered un-usable by forced cycling of connection

Added by Marcus Brown almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
09/29/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
Affected Architecture:

Description

My 3G modem (USB Mercury connect) gets locked up when function interface_configure is called and the modem is already connected.

This piece of code was added recently to the function interface_configure:

switch ($wancfg['ipaddr']) {
            case 'pppoe':
            case 'l2tp':
            case 'pptp':
            case 'ppp':
                interface_bring_down($interface, true);
                break;
            default:
                interface_bring_down($interface);
                break;
        }
    }

The function interface_ppps_configure is already written to gracefully bring down the interface and wait for the disconnect protocol to finish before it starts it again (by using the -k command line switch for mpd5.)

This new code in function interface_configure doesn't wait for the disconnect protocol to finish before it restarts mpd5, and the modem locks up as a result. Only rebooting or disconnecting the modem will allow it to work again. Sometimes only rebooting will allow it to work again.

Problem starts here I think.

commit 990fb7a9a9b03f744c56792011f1c1e2950ce764
Author: Ermal <>
Date: Wed Sep 1 12:13:46 2010 +0000

Ticket #867. Do not destory interfaces other than preventing a loop for ppp interfaces during interface configuration.

commit fb2f0db170874ecfdb787190a33d535e2971ad79
Author: Erik Fonnesbeck <>
Date: Fri Sep 3 18:49:32 2010 -0600

Revert "Ticket #867. Do not destory interfaces other than preventing a loop for ppp interfaces during interface configuration."
This reverts commit 990fb7a9a9b03f744c56792011f1c1e2950ce764.

commit 3896d93ec5b2d28ed4f6fdbcfbfc032ddf9c564d
Author: Erik Fonnesbeck <>
Date: Fri Sep 3 18:58:45 2010 -0600

Do this check earlier rather than later, instead of moving the interface_bring_down call.

Associated revisions

Revision f5ea58da (diff)
Added by Ermal Luçi almost 9 years ago

Ticket #927. Increase timeout to gice mpd the time needed to exit gracefully.

History

#1 Updated by Ermal Luçi almost 9 years ago

  • Status changed from New to Feedback

Try with latest changes.

#2 Updated by Marcus Brown almost 9 years ago

Can we please just remove the non-sense with the 5 second sleep from the code? It's just a race condition waiting to happen.

I wrote above:
"The function interface_ppps_configure is already written to gracefully bring down the interface and wait for the disconnect protocol to finish before it starts it again (by using the -k command line switch for mpd5.)"

Just take out the call to "kill by pid" for any connection handled by mpd5.

Thanks.

#3 Updated by Marcus Brown almost 9 years ago

Sorry, what I meant was that the call to "interface_bring_down($interface, true);" in the beginning of the "interface_configure" function is completely unnecessary, and in fact can cause problems as pointed out by this ticket.

The was to resolve this ticket is to remove the call, not make the sleep time from 2 seconds to 5 seconds.

#4 Updated by Marcus Brown almost 9 years ago

Sorry, what I meant was that the call to "interface_bring_down($interface, true);" in the beginning of the "interface_configure" function is completely unnecessary, and in fact can cause problems as pointed out by this ticket.

The was to resolve this ticket is to remove the call, not make the sleep time from 2 seconds to 5 seconds.

#5 Updated by Ermal Luçi over 8 years ago

  • Status changed from Feedback to Closed

I do not think there is any issue here so move along.

Also available in: Atom PDF