-
Notifications
You must be signed in to change notification settings - Fork 7k
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
PPP does not shut-down the link properly #67627
Comments
@bjarki-trackunit please also take a look if you have time. |
I don't believe the Maybe @jhirsi can expand on the issue? |
@RobMeades, a good catch! I was able to repro that with NCS modem_shell as well when initiating a close from modem_shell side by using |
We seem to agree on the issue :) The solution should be to remove zephyr/include/zephyr/net/net_if.h Line 2832 in 9074fea
zephyr/include/zephyr/net/net_if.h Line 2850 in 9074fea
We clear the flag in the net if init function used by cellular modems, see zephyr/subsys/modem/modem_ppp.c Lines 390 to 404 in 9074fea
|
That sounds great: while we're here, headrev Zephyr's
Since I am using the asynchronous UART interface this would cause the same problem: could it be removed also? |
@tomi-font Hi, can you help with this issue? I think you added the call to |
My 2 cents here. For me the PPP driver does not seem to be the problem here (if the PPP L2 tells the driver to stop it's operation by calling It's probably even more confusing, given the PPP interface management logic is scattered between |
@bjarki-trackunit can you take a look at Robert's comment? |
@carlescufi I'm working on a solution which makes everyone happy :) Give me a couple of hours ;) |
The PR #67731 should explain itself, but I will address your comment here for clarity :)
Agreed, when disabling the interface, the L2 PPP will now block until PPP is dead, before calling the
The management logic still uses both the call to |
Transferred here from https://discord.com/channels/720317445772017664/733037635194585148/1196453166590476439.
PR #61147 made a change to the PPP driver so that it calls
net_if_carrier_off()
insideppp_stop()
:Unfortunately, this means the PPP shut-down process cannot work correctly, since
fsm.c
ppp_send_pkt()
checks that the carrier is up in order to send packets, packets which need to be exchanged in order to run through the shut-down process with the PPP peer.So after calling
net_if_down()
on a PPP link you end up with something like this (noting my debug prints preceded by###
):The link just times out and the PPP peer knows nothing about it.
If I comment out the call to
net_if_carrier_off()
inppp_stop()
then a proper link termination, with the peer, is performed.To Reproduce
Impact
The PPP peer is left hanging, which mean it won't start up again the next time you try to connect to it unless you've power- cycled or reset it. In other words, once you have disconnected PPP you can never connect it again.
Version
uart_rx_disable()
for the asynchronous UART case (which I am using)...!?The text was updated successfully, but these errors were encountered: