68aea12ef4e9df041b6ccbd2a1daf919a24b4af0
[openwrt/openwrt.git] / package / network / services / ppp / patches / 205-no_exponential_timeout.patch
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 @@ -644,7 +644,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 @@ -659,7 +661,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 if (!conn->seenMaxPayload) {