net: l2: ppp: Don't attempt reestablish PPP if carrier is down
This commit adds a check to prevent attempting to reestablish the PPP session if the carrier is down. Without this check, the PPP FSM attempts and fails to establish a PPP session twice before giving up. The behavior is not breaking anything, but it is not desired. Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
This commit is contained in:
parent
9d1b7086d7
commit
d6a96a4b24
1 changed files with 4 additions and 0 deletions
|
@ -179,6 +179,10 @@ static void lcp_down(struct ppp_fsm *fsm)
|
|||
|
||||
ppp_link_down(ctx);
|
||||
|
||||
if (!net_if_is_carrier_ok(ctx->iface)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ppp_change_phase(ctx, PPP_ESTABLISH);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue