Hi!
I believe you need diald 0.16 patch 5 for this.
THis is a patch to help with larger ISPs who have several POPs, static
IP numbers that work on DIFFERENT diald in servers. I am the systems
admin for an ISP with about 3 dial-in servers (2 Livingstone
Portmaster 2es and a US Robotics/3com TC rack (no OPSF BLEARCHH!) and
we use static IP numbers and and host routes from the dial-in servers.
The route-wait configuration item was useless for us as we turn off
routing traffic to dial-in customers (security), and it takes 3-5
seconds to establish the host routes. These routes are needed for the
return traffic to thte dialed-in customer.
The new 'up-delay' configuration argmuent takes an argument in
seconds. Diald will wait this number seconds after the PPP interface
is up (or after route-wait finishes) before sending queued packets.
I believe that the route-wait feature and the up-delay can be rolled
into diald's SLIP, ISDN and other dial up management code.
Cheers,
MAtthew Grant
--- diald-0.16.orig/diald.h Mon May 18 08:57:38 1998
+++ diald-0.16/diald.h Mon May 18 08:39:18 1998
@@ -252,6 +252,7 @@
int start_pppd_timeout;
int stop_pppd_timeout;
int first_packet_timeout;
+int up_delay;
int retry_count;
int died_retry_count;
int redial_backoff_start;
@@ -447,3 +448,4 @@
void del_impulse(FW_unit *unit);
void del_connection(FW_Connection *c);
void slip_start_fail(void * data);
+void ppp_up_delay_timeout(void * data);
--- diald-0.16.orig/options.c Mon May 18 08:57:38 1998
+++ diald-0.16/options.c Mon May 18 08:38:35 1998
@@ -81,6 +81,7 @@
int redial_backoff_start = -1;
int redial_backoff_limit = 600;
int dial_fail_limit = 0;
+int up_delay = 0;
#ifdef SIOCSKEEPALIVE
int keepalive = 0;
@@ -170,6 +171,7 @@
{"start-pppd-timeout","<timeout>",1,&start_pppd_timeout,set_int},
{"stop-pppd-timeout","<timeout>",1,&stop_pppd_timeout,set_int},
{"first-packet-timeout","<timeout>",1,&first_packet_timeout,set_int},
+ {"up-delay","<timeout>",1,&up_delay,set_int},
{"retry-count","<count>",1,&retry_count,set_int},
{"died-retry-count","<count>",1,&died_retry_count,set_int},
{"redial-backoff-start","<count>",1,&redial_backoff_start,set_int},
@@ -242,6 +244,7 @@
start_pppd_timeout = 60;
stop_pppd_timeout = 60;
first_packet_timeout = DEFAULT_FIRST_PACKET_TIMEOUT;
+ up_delay = 0;
retry_count = 0;
died_retry_count = 1;
redial_backoff_start = -1;
--- diald-0.16.orig/ppp.c Mon May 18 08:57:39 1998
+++ diald-0.16/ppp.c Mon May 18 23:14:34 1998
@@ -22,6 +22,10 @@
/* internal flag to shortcut repeated calls to setaddr */
static int rx_count = -1;
+/* internal flag indicating waiting for routes to be established at far end */
+static int in_up_delay = -1;
+/* timer structure for above */
+struct timer_lst upt;
void ppp_start()
{
@@ -31,6 +35,7 @@
link_iface = -1;
rx_count = -1;
+ in_up_delay = -1;
/* Run pppd directly here and set up to wait for the iface */
link_pid = fork();
@@ -113,6 +118,16 @@
memset ((char *) &(addr), '\0', sizeof(addr)); \
addr.sa_family = (family);
+
+/*
+ * Timeout function wahile waiting for routes to be established at the far
+ * end.
+ */
+void ppp_up_delay_timeout(void *data) {
+ in_up_delay = 0;
+}
+
+
/*
* Find the interface number of the ppp device that pppd opened up and
* do any routing we might need to do.
@@ -153,6 +168,22 @@
/* check if we got the routing packet yet */
if (ppp_rx_count() == rx_count) return 0;
+ }
+
+ if (up_delay) {
+ /* Wait for a specified time in seconds after interface has
+ come up */
+ if( in_up_delay == -1 ) {
+ in_up_delay = 1;
+ init_timer(&upt);
+ upt.data = NULL;
+ upt.function = ppp_up_delay_timeout;
+ upt.expires = up_delay;
+ add_timer(&upt);
+ }
+ if(in_up_delay)
+ return 0; /* routes are proabably not established yet */
+
}
/* Ok, the interface is up, grab the addresses. */
--- diald-0.16.orig/timer.c Mon May 18 08:57:39 1998
+++ diald-0.16/timer.c Mon May 18 08:39:35 1998
@@ -84,7 +84,8 @@
{
if (c->function == del_impulse
|| c->function == del_connection
- || c->function == slip_start_fail)
+ || c->function == slip_start_fail
+ || c->function == ppp_up_delay_timeout)
return 1;
syslog(LOG_ERR, "Caught a bad function value %p. Tell Eric.\n",
c->function);
--- diald-0.16.orig/doc/diald.man Mon May 18 08:57:39 1998
+++ diald-0.16/doc/diald.man Sat May 23 21:09:53 1998
@@ -776,6 +776,13 @@
the IP layer to have come up until it sees at least one packet come
from the remote side. Hopefully almost no-one will need this option.
.TP
+.B up-delay \fI<n>\fR
+Set the number of seconds after the PPP link is up that diald waits
+before considering that the IP layer is up. This is needed when
+connecting to a larger ISP with many dial-in servers in connection
+with a static IP number as it takes few seconds for routes to be
+established back to the PPP link.
+.TP
.B two-way
Normally if the connection is broken by the other end hanging up
diald will immediately re-dial the other end. This command forces
--
-----------------------------------------------------------------------
Matthew Grant Email: [EMAIL PROTECTED]
Phone: +64 3 338-6287
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]