summaryrefslogtreecommitdiffstats
path: root/usr.sbin/IPXrouted
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>1996-11-24 08:35:23 +0000
committerjhay <jhay@FreeBSD.org>1996-11-24 08:35:23 +0000
commitbfe134d63fc0d5d622ddac1ca7c7035958b686c1 (patch)
treed42d79160fd97d3f02572ce013311c555ecfc4ba /usr.sbin/IPXrouted
parentdd3198090d6d3cba6dde6c0b837e9a3c069f4664 (diff)
downloadFreeBSD-src-bfe134d63fc0d5d622ddac1ca7c7035958b686c1.zip
FreeBSD-src-bfe134d63fc0d5d622ddac1ca7c7035958b686c1.tar.gz
Slow down the RIP and SAP broadcasts. At least some NW4.x machines can't
handle them back-to-back. (We couldn't either without my ipx receive buffer enlargement.)
Diffstat (limited to 'usr.sbin/IPXrouted')
-rw-r--r--usr.sbin/IPXrouted/output.c9
-rw-r--r--usr.sbin/IPXrouted/sap_output.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/usr.sbin/IPXrouted/output.c b/usr.sbin/IPXrouted/output.c
index f44d8c8..27d55dd 100644
--- a/usr.sbin/IPXrouted/output.c
+++ b/usr.sbin/IPXrouted/output.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: output.c,v 1.2 1995/12/05 04:59:54 julian Exp $
+ * $Id: output.c,v 1.3 1996/04/13 15:13:20 jhay Exp $
*/
#ifndef lint
@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)output.c 8.1 (Berkeley) 6/5/93";
/*
* Routing Table Management Daemon
*/
+#include <unistd.h>
#include "defs.h"
/*
@@ -134,6 +135,7 @@ supply(dst, flags, ifp)
af_output_t *output = afswitch[dst->sa_family].af_output;
int doinghost = 1, size, metric, ticks;
union ipx_net net;
+ int delay = 0;
if (sipx->sipx_port == 0)
sipx->sipx_port = htons(IPXPORT_RIP);
@@ -148,6 +150,11 @@ again:
(*output)(ripsock, flags, dst, size);
TRACE_OUTPUT(ifp, dst, size);
n = msg->rip_nets;
+ delay++;
+ if(delay == 2) {
+ usleep(20000);
+ delay = 0;
+ }
}
/*
diff --git a/usr.sbin/IPXrouted/sap_output.c b/usr.sbin/IPXrouted/sap_output.c
index a7be79e..1de0259 100644
--- a/usr.sbin/IPXrouted/sap_output.c
+++ b/usr.sbin/IPXrouted/sap_output.c
@@ -28,12 +28,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sap_output.c,v 1.3 1995/12/05 04:59:56 julian Exp $
+ * $Id: sap_output.c,v 1.4 1996/04/13 15:13:24 jhay Exp $
*/
/*
* Routing Table Management Daemon
*/
+#include <unistd.h>
#include "defs.h"
/*
@@ -117,6 +118,7 @@ sap_supply(dst, flags, ifp, ServType)
struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) dst;
af_output_t *output = afswitch[dst->sa_family].af_output;
int size, metric;
+ int delay = 0;
if (sipx->sipx_port == 0)
sipx->sipx_port = htons(IPXPORT_SAP);
@@ -131,6 +133,11 @@ sap_supply(dst, flags, ifp, ServType)
(*output)(sapsock, flags, dst, size);
TRACE_SAP_OUTPUT(ifp, dst, size);
n = sap_msg->sap;
+ delay++;
+ if(delay == 2) {
+ usleep(20000);
+ delay = 0;
+ }
}
/*
OpenPOWER on IntegriCloud