| 1 | pppd: Don't use exponential timeout in discovery phase |
| 2 | |
| 3 | This patch removes the exponential timeout increase between PADO or PADS |
| 4 | discovery attempts. |
| 5 | |
| 6 | Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> |
| 7 | |
| 8 | --- a/pppd/plugins/rp-pppoe/discovery.c |
| 9 | +++ b/pppd/plugins/rp-pppoe/discovery.c |
| 10 | @@ -548,7 +548,9 @@ discovery(PPPoEConnection *conn) |
| 11 | conn->discoveryState = STATE_SENT_PADI; |
| 12 | waitForPADO(conn, timeout); |
| 13 | |
| 14 | +#if 0 |
| 15 | timeout *= 2; |
| 16 | +#endif |
| 17 | } while (conn->discoveryState == STATE_SENT_PADI); |
| 18 | |
| 19 | timeout = conn->discoveryTimeout; |
| 20 | @@ -563,7 +565,9 @@ discovery(PPPoEConnection *conn) |
| 21 | sendPADR(conn); |
| 22 | conn->discoveryState = STATE_SENT_PADR; |
| 23 | waitForPADS(conn, timeout); |
| 24 | +#if 0 |
| 25 | timeout *= 2; |
| 26 | +#endif |
| 27 | } while (conn->discoveryState == STATE_SENT_PADR); |
| 28 | |
| 29 | /* We're done. */ |
| 30 | |