summaryrefslogtreecommitdiff
path: root/user/ppp/32_all_pado-timeout.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/ppp/32_all_pado-timeout.patch')
-rw-r--r--user/ppp/32_all_pado-timeout.patch34
1 files changed, 0 insertions, 34 deletions
diff --git a/user/ppp/32_all_pado-timeout.patch b/user/ppp/32_all_pado-timeout.patch
index 72f1adbb1..e17658456 100644
--- a/user/ppp/32_all_pado-timeout.patch
+++ b/user/ppp/32_all_pado-timeout.patch
@@ -218,37 +218,3 @@
/* Is it PADS? */
if (packet.code == CODE_PADS) {
/* Parse for goodies */
---- ppp-2.4.6/pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ ppp-2.4.6/pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -14,6 +14,7 @@
- #include <unistd.h>
- #include <errno.h>
- #include <string.h>
-+#include <time.h>
-
- #include "pppoe.h"
-
-@@ -513,6 +514,8 @@
- struct timeval tv;
- PPPoEPacket packet;
- int len;
-+ time_t start, now;
-+ int time_remain;
-
- struct PacketCriteria pc;
- pc.conn = conn;
-@@ -522,9 +525,13 @@
- pc.seenServiceName = 0;
- conn->error = 0;
-
-+ time(&start);
- do {
-+ time(&now);
-+ time_remain = timeout - (int)difftime(now, start);
-+ if (time_remain <= 0) return; /* Timed out */
- if (BPF_BUFFER_IS_EMPTY) {
-- tv.tv_sec = timeout;
-+ tv.tv_sec = time_remain;
- tv.tv_usec = 0;
-
- FD_ZERO(&readable);