3a3488b0cabe9e360c9da99caf7ae6902fab98de
[openwrt/svn-archive/archive.git] / package / ppp / patches / 205-no_exponential_timeout.patch
1 diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c
2 --- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 19:47:30.000000000 -0400
3 +++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 20:23:04.000000000 -0400
4 @@ -593,12 +593,14 @@
5 conn->discoveryState = STATE_SENT_PADI;
6 waitForPADO(conn, timeout);
7
8 +#if 0
9 /* If we're just probing for access concentrators, don't do
10 exponential backoff. This reduces the time for an unsuccessful
11 probe to 15 seconds. */
12 if (!conn->printACNames) {
13 timeout *= 2;
14 }
15 +#endif
16 if (conn->printACNames && conn->numPADOs) {
17 break;
18 }
19 @@ -621,7 +623,9 @@
20 sendPADR(conn);
21 conn->discoveryState = STATE_SENT_PADR;
22 waitForPADS(conn, timeout);
23 +#if 0
24 timeout *= 2;
25 +#endif
26 } while (conn->discoveryState == STATE_SENT_PADR);
27
28 /* We're done. */
29 diff -Naur ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c
30 --- ppp-2.4.4.orig/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 19:47:30.000000000 -0400
31 +++ ppp-2.4.4/pppd/plugins/rp-pppoe/discovery.c 2009-05-07 20:23:04.000000000 -0400
32 @@ -593,12 +593,14 @@
33 conn->discoveryState = STATE_SENT_PADI;
34 waitForPADO(conn, timeout);
35
36 +#if 0
37 /* If we're just probing for access concentrators, don't do
38 exponential backoff. This reduces the time for an unsuccessful
39 probe to 15 seconds. */
40 if (!conn->printACNames) {
41 timeout *= 2;
42 }
43 +#endif
44 if (conn->printACNames && conn->numPADOs) {
45 break;
46 }
47 @@ -621,7 +623,9 @@
48 sendPADR(conn);
49 conn->discoveryState = STATE_SENT_PADR;
50 waitForPADS(conn, timeout);
51 +#if 0
52 timeout *= 2;
53 +#endif
54 } while (conn->discoveryState == STATE_SENT_PADR);
55
56 /* We're done. */