summaryrefslogtreecommitdiffstats
path: root/usr.sbin/IPXrouted/sap_output.c
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>1997-07-06 07:38:36 +0000
committerjhay <jhay@FreeBSD.org>1997-07-06 07:38:36 +0000
commit18fa8ff2b470b736a50fb803e1e891bc2f4d247b (patch)
tree99ed7bad5d7b247fd7423644806e43dc4dc3a8dc /usr.sbin/IPXrouted/sap_output.c
parent60f787e21f64c5425b302b242c9a638f55ebb6ad (diff)
downloadFreeBSD-src-18fa8ff2b470b736a50fb803e1e891bc2f4d247b.zip
FreeBSD-src-18fa8ff2b470b736a50fb803e1e891bc2f4d247b.tar.gz
Major IPXrouted rework.
In rt_change() remember to update the interface pointer otherwise we will send the RIP packets to the wrong interface(s) in future. Update the hash generator and increase the size of the hash tables. Only use the network and host parts when comparing IPX interface addresses. Immediately broadscast RIP and SAP changes. Change the alarm code to use the setitimer() call and only set a flag in the alarm signal handler. This gets rid of possible race conditions. Remove the host routing table. IPX RIP cannot do host routes, only net routes. Make the delay between broadcast packets 50ms. It seems that some Netware 4.x servers is very slow and don't have much input buffering. Handle received messages about networks and services that go down, better. Add tracing of RIP and SAP changes. It gets sysloged with a level of LOG_DEBUG.
Diffstat (limited to 'usr.sbin/IPXrouted/sap_output.c')
-rw-r--r--usr.sbin/IPXrouted/sap_output.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/usr.sbin/IPXrouted/sap_output.c b/usr.sbin/IPXrouted/sap_output.c
index 11c9cc0..7f7dbcd 100644
--- a/usr.sbin/IPXrouted/sap_output.c
+++ b/usr.sbin/IPXrouted/sap_output.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: sap_output.c,v 1.7 1997/02/22 16:01:00 peter Exp $
*/
/*
@@ -44,7 +44,8 @@
* the output to the known router.
*/
void
-sap_supply_toall(void)
+sap_supply_toall(changesonly)
+ int changesonly;
{
register struct interface *ifp;
struct sockaddr dst;
@@ -65,15 +66,16 @@ sap_supply_toall(void)
ipx_dst->sipx_addr.x_port = htons(IPXPORT_SAP);
flags = ifp->int_flags & IFF_INTERFACE ? MSG_DONTROUTE : 0;
- sap_supply(&dst, flags, ifp, SAP_WILDCARD);
+ sap_supply(&dst, flags, ifp, SAP_WILDCARD, changesonly);
}
}
void
-sapsndmsg(dst, flags, ifp)
+sapsndmsg(dst, flags, ifp, changesonly)
struct sockaddr *dst;
int flags;
struct interface *ifp;
+ int changesonly;
{
struct sockaddr t_dst;
struct sockaddr_ipx *ipx_dst;
@@ -104,11 +106,12 @@ sapsndmsg(dst, flags, ifp)
* clones.
*/
void
-sap_supply(dst, flags, ifp, ServType)
+sap_supply(dst, flags, ifp, ServType, changesonly)
struct sockaddr *dst;
int flags;
struct interface *ifp;
int ServType;
+ int changesonly;
{
register struct sap_entry *sap;
register struct sap_entry *csap; /* Clone route */
@@ -135,11 +138,14 @@ sap_supply(dst, flags, ifp, ServType)
n = sap_msg->sap;
delay++;
if(delay == 2) {
- usleep(20000);
+ usleep(50000);
delay = 0;
}
}
+ if (changesonly && !(sap->state & RTS_CHANGED))
+ continue;
+
/*
* Check for the servicetype except if the ServType is
* a wildcard (0xFFFF).
OpenPOWER on IntegriCloud