* That's the timeout routine if we are authenticator. Since the * authenticator is basically passive in PAP, we can't do much here. */
| 4545 | * authenticator is basically passive in PAP, we can't do much here. |
| 4546 | */ |
| 4547 | static void |
| 4548 | sppp_pap_TO(void *cookie) |
| 4549 | { |
| 4550 | struct sppp *sp = (struct sppp *)cookie; |
| 4551 | STDDCL; |
| 4552 | |
| 4553 | SPPP_LOCK(sp); |
| 4554 | if (debug) |
| 4555 | log(LOG_DEBUG, SPP_FMT "pap TO(%s) rst_counter = %d\n", |
| 4556 | SPP_ARGS(ifp), |
| 4557 | sppp_state_name(sp->state[IDX_PAP]), |
| 4558 | sp->rst_counter[IDX_PAP]); |
| 4559 | |
| 4560 | if (--sp->rst_counter[IDX_PAP] < 0) |
| 4561 | /* TO- event */ |
| 4562 | switch (sp->state[IDX_PAP]) { |
| 4563 | case STATE_REQ_SENT: |
| 4564 | pap.tld(sp); |
| 4565 | sppp_cp_change_state(&pap, sp, STATE_CLOSED); |
| 4566 | break; |
| 4567 | } |
| 4568 | else |
| 4569 | /* TO+ event, not very much we could do */ |
| 4570 | switch (sp->state[IDX_PAP]) { |
| 4571 | case STATE_REQ_SENT: |
| 4572 | /* sppp_cp_change_state() will restart the timer */ |
| 4573 | sppp_cp_change_state(&pap, sp, STATE_REQ_SENT); |
| 4574 | break; |
| 4575 | } |
| 4576 | |
| 4577 | SPPP_UNLOCK(sp); |
| 4578 | } |
| 4579 | |
| 4580 | /* |
| 4581 | * That's the timeout handler if we are peer. Since the peer is active, |
nothing calls this directly
no test coverage detected