GNOME Bugzilla – Bug 561778
Dispatcher with 3G connections doens't work like it should
Last modified: 2008-11-24 18:28:38 UTC
Please describe the problem: If I disconnect the 3G connection throug the nm-applet, NetworkManager should run the Dispatcher Action "down" before it disconnect from the 3G network, but it disconnects beforce the Dispatcher Action "down" is performed. I discovered the bug because I'm using "vnStat" to calcualte my device stats. It is a app which measures the amount of data which is transferedevery 5minutes. So if I disconnect the connection, I want tu run vnstat the last time so ist also measures the data which is transfered since the last intervall. But ist complains that the device "ppp0" doesn't exist anymore. So I checked the Dispatcher and discovered this Bug. There is anotherbug too, the Dispather gets a false IFACE name, instead of the correct device "ppp0" it gets "ttyUSB0" (the 3G modem serial interface). Steps to reproduce: 1. Connect to a 3G network throug NetworkManager 2. Disconnect from the 3G Network Actual results: The connection will be disconnected before the Dispatcher action "down" is performed. Expected results: The connection will be disconnected after the Dispatcher action "down" is performed.And after the disconnect the Dispatcher action "post-down" should be performed. Does this happen every time? Yes Other information:
*** This bug has been marked as a duplicate of 387832 ***
I think this bug isn't a duplicate of 387832, because 387832 suggests an enhancement and this bug describes a problem in the dispatcher which should already work.
This is actually a dupe, because the other bug is an RFE requesting a method by which applications have a chance to do something _before_ the network connection is terminated, which is essentially what this request was, right? Note that NetworkManager also emits signals on the bus showing the amount of data that PPP reports as transferred, which updates every 5 seconds.
No, this bug hasn't anything todo with dbus. This bug is about the ifupdown system (called dispatcher in NM). So you can put scripts into "/etc/NetworkManager/dispatcher.d/" which are executed on every connection change. There is a standard script ("/etc/NetworkManager/dispatcher.d/01ifupdown") which runs the normal ifupdown system found in "/etc/network/". But this doesn't work correctly with 3G connections, as I described in the first case. It has absolutly nothing todo with any sort of sending signals to apps on dbus or hal. PS: Sorry for my English :-)
(In reply to comment #0) > Please describe the problem: > If I disconnect the 3G connection throug the nm-applet, NetworkManager should > run the Dispatcher Action "down" before it disconnect from the 3G network, but > it disconnects beforce the Dispatcher Action "down" is performed. I discovered NM runs the disconnect _after_ the network is down, because many times you cannot predict when the network will go down, or the network may go down without warning, and also because NM cannot wait on arbitrary numbers of scripts before taking the interface down. > the bug because I'm using "vnStat" to calcualte my device stats. It is a app > which measures the amount of data which is transferedevery 5minutes. So if I > disconnect the connection, I want tu run vnstat the last time so ist also > measures the data which is transfered since the last intervall. But ist > complains that the device "ppp0" doesn't exist anymore. So I checked the > Dispatcher and discovered this Bug. There is anotherbug too, the Dispather gets > a false IFACE name, instead of the correct device "ppp0" it gets "ttyUSB0" (the > 3G modem serial interface). Please convert the program to listen for the NetworkManager D-Bus signals which provide eqiuvalent functionality at an even higher granularity than you're currently using. > Steps to reproduce: > 1. Connect to a 3G network throug NetworkManager > 2. Disconnect from the 3G Network > > Actual results: > The connection will be disconnected before the Dispatcher action "down" is > performed. > > Expected results: > The connection will be disconnected after the Dispatcher action "down" is This will only happen sometimes, because often the network goes down unexpectedly. A "down" even before the network goes away would be purely informational and could not be relied upon..
k, now I understand the problem thank you :-) I'm not the author of this app, and I'm not a good programmer. Furthermore I don't know how dbus works. I just thought this is a bug, so can you mark this bug report as invalid or something else.