Software Package:       
	gated

Release/Version:
	R3_5Alpha_11

Retrieved from:
	gated.merit.edu:net-research/gated/gated-r3_5alpha_11.tar.gz

Bug reports:
	This software package is maintained by the software contributor,
	not BSDI.  Please send any bug reports to both support@BSDI.COM
	and gated-people@gated.cornell.edu.

Comments:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Modifications to this version made by BSDI:

The addition of makefile to provide BSDI style make targets,
the addition of src/configs/bsdi-bsd.386-2.1
Selected patches from 3.5B1.
Patches to set owner, group and modes on installed files (returned to Merit)
Patches to silence some compilation warnings (returned to Merit)


Index: src/gdc.c
===================================================================
RCS file: /master/contrib/gated/src/gdc.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 gdc.c
--- 1.1.1.1	1995/11/22 19:21:26
+++ gdc.c	1995/12/12 02:43:32
@@ -379,8 +379,9 @@
 		       strerror(error));
     } else {
 	syslog(LOG_ERR,
-	       "%s: %m",
-	       buf);
+	       	"%s: %s: %m",
+		gdcprogname,
+	       	buf);
     }
 }
 
@@ -1059,8 +1060,8 @@
     }
 
     if (!quiet) {
-	(void) printf("gated is running (pid %u)\n",
-		      pid);
+	(void) printf("gated is running (pid %lu)\n",
+		      (u_long) pid);
     }
     return 0;
 }
@@ -1210,8 +1211,8 @@
 	nap(GDCMAXWAIT);
 	if (getrunningpid(&pid, 1)) {
 	    if (!quiet) {
-		(void) printf("gated started, pid %u\n",
-			      pid);
+		(void) printf("gated started, pid %lu\n",
+			      (u_long) pid);
 	    }
 	    return 0;
 	}
Index: src/ospf_init.c
===================================================================
RCS file: /master/contrib/gated/src/ospf_init.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ospf_init.c
--- 1.1.1.1	1995/11/22 19:21:42
+++ ospf_init.c	1995/12/12 02:43:45
@@ -646,7 +646,7 @@
 			  "Retransmit",
 			  0,
 			  intf->retrans_timer,
-			  offset,
+			  offset % intf->retrans_timer,
 			  tq_retrans,
 			  (void_t) intf);
 
Index: src/ospf_monitor.c
===================================================================
RCS file: /master/contrib/gated/src/ospf_monitor.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ospf_monitor.c
--- 1.1.1.1	1995/11/22 19:21:43
+++ ospf_monitor.c	1995/12/12 02:43:49
@@ -308,7 +308,7 @@
  	/* 
  	 * show advertisement 
  	 */
- 	ret = sscanf(buf, "%*s %*s %s %lu %s %s",
+ 	ret = sscanf(buf, "%*s %*s %s %u %s %s",
 		     area_id_st,
 		     &m->p[1],
 		     ip_addr_st,
@@ -360,7 +360,7 @@
 	/* Fall through */
 
     default:
- 	ret = sscanf(buf, "%*s %*s %lu %lu %lu %lu %lu %lu %lu",
+ 	ret = sscanf(buf, "%*s %*s %u %u %u %u %u %u %u",
 		     &m->p[0],
 		     &m->p[1],
 		     &m->p[2],
Index: src/parser.y
===================================================================
RCS file: /master/contrib/gated/src/parser.y,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 parser.y
--- 1.1.1.1	1995/11/22 19:21:47
+++ parser.y	1995/12/12 02:44:19
@@ -2422,15 +2422,17 @@
 				PARSE_ERROR;
 			    }
 
-			    /* Install each of the entries */
-			    DMI_WALK_ALL($3->adv_dm.dm_internal, dmi, adv) {
-				ospf_parse_add_net(ospf_AREA,
-						   adv->adv_dm.dm_dest,
-						   adv->adv_dm.dm_mask,
-						   adv->adv_result.res_flag);
-			    } DMI_WALK_ALL_END($3->adv_dm.dm_internal, dmi, adv) ;
+			    if ($3) {
+				/* Install each of the entries */
+				DMI_WALK_ALL($3->adv_dm.dm_internal, dmi, adv) {
+				    ospf_parse_add_net(ospf_AREA,
+						       adv->adv_dm.dm_dest,
+						       adv->adv_dm.dm_mask,
+						       adv->adv_result.res_flag);
+				} DMI_WALK_ALL_END($3->adv_dm.dm_internal, dmi, adv) ;
 
-			    adv_free_list($3);
+				adv_free_list($3);
+			    }
 			}
 		| T_INTERFACE ospf_interface
 			{
Index: src/rt_aggregate.c
===================================================================
RCS file: /master/contrib/gated/src/rt_aggregate.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 rt_aggregate.c
--- 1.1.1.1	1995/11/22 19:21:51
+++ rt_aggregate.c	1995/12/12 02:44:23
@@ -243,6 +243,31 @@
 			aggr_rt = rtah->rtah_rta_rt = rt_add(&rt_aggregate_rtparms);
 			assert(aggr_rt);
 
+                        /*
+                         * Since we are deleting and re-adding the route, we
+			 * must update the corresponding policy (adv_entry)
+			 * to point to the new route.
+                         */
+                        AGGR_FAMILIES(afp) {
+                            /* Find aggregate route address family. */
+                            if (afp->rtaf_family == socktype(old_rt->rt_dest)) {
+                                register dest_mask_internal *dmi;
+
+                                if (!*afp->rtaf_list) {
+                                    continue;
+                                }
+                                /* Walk the aggregate list looking for adv
+				 * entries matching the old route
+				 */
+                                DMI_WALK_ALL( (*afp->rtaf_list)->adv_dm.dm_internal, dmi, aggr_adv) {
+                                    if (aggr_adv->adv_result.res_void == (void_t) old_rt) {
+                                        aggr_adv->adv_result.res_void = (void_t) aggr_rt;
+                                        break;
+                                     }
+				} DMI_WALK_ALL_END( (*afp->rtaf_list)->adv_dm.dm_internal, dmi, aggr_adv) ;
+                            }
+                        } AGGR_FAMILIES_END(afp) ;
+
 			rt_delete(old_rt);
 		    } else {
 
Index: src/sockaddr.c
===================================================================
RCS file: /master/contrib/gated/src/sockaddr.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sockaddr.c
--- 1.1.1.1	1995/11/22 19:21:56
+++ sockaddr.c	1995/12/12 02:44:28
@@ -94,7 +94,7 @@
     case AF_STRING:
 	return s1->s.gs_len == s2->s.gs_len
 	    && !strncmp(s1->s.gs_string, s2->s.gs_string,
-			s1->s.gs_len - sizeof(s1->s) - 1);
+			s1->s.gs_len - (sizeof(s1->s) - 1));
     }
 
     return FALSE;
@@ -965,9 +965,9 @@
 void
 sock_init __PF0(void)
 {
-    sock_buf = task_block_malloc(task_pagesize);
+    sock_buf_size = task_pagesize * SOCK_BUF_PAGES;
+    sock_buf = task_block_malloc(sock_buf_size);
     sock_bufp = sock_buf;
-    sock_buf_size = task_pagesize;
 }
 
 
Index: src/sockaddr.h
===================================================================
RCS file: /master/contrib/gated/src/sockaddr.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sockaddr.h
--- 1.1.1.1	1995/11/22 19:21:57
+++ sockaddr.h	1995/12/12 02:44:30
@@ -86,6 +86,10 @@
 #define	unix_socksize(x)	(sizeof (*x))
 #endif	/* SOCKET_LENGTHS */
 
+#ifndef       SOCK_BUF_PAGES
+#define       SOCK_BUF_PAGES  1
+#endif        /* SOCK_BUF_PAGES */
+
 
 /* Types for AF_LL */
 #define	LL_OTHER	0	/* Unknown or Other */
Index: src/trace.c
===================================================================
RCS file: /master/contrib/gated/src/trace.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 trace.c
--- 1.1.1.1	1995/11/22 19:21:59
+++ trace.c	1995/12/12 02:44:35
@@ -1265,6 +1265,7 @@
 
 	/* Rotate them around */
 	trace_rotate(trp->tr_file);
+	file = trp->tr_file->trf_FILE;
     }
 
     trp->tr_file->trf_size += size;
Index: src/configs/README
===================================================================
RCS file: /master/contrib/gated/src/configs/README,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 README
--- 1.1.1.1	1995/11/22 19:22:01
+++ README	1995/12/12 02:44:42
@@ -115,6 +115,7 @@
 	cat		(cat)
 	chgrp		(chgrp)
 	chmod		(chmod)
+	chown		(chown)
 	date		(date)
 	make		(make)
 	mv		(mv)
@@ -321,6 +322,11 @@
 		to create a new group, the use of group wheel may
 		be appropriate.
 
+	gdc_user	(root)
+
+		The user (from /etc/passwd) that Gated must be started
+		as.
+
 	GDC_RESOURCE
 
 		Compile in gdc support for setting system resource limits
@@ -882,6 +888,22 @@
 				can send routing updates to.  If you get an
 				assertion failure in rtbit_alloc, increase this
 				number for another 32 targets.
+
+                        SOCK_BUF_PAGES  (1)
+                                This controls the size of the buffer for
+				temporary sockaddr's.  If you are supporting
+				many interfaces and are experiencing assertion
+				failures in sockishos t, you most likely need
+				to increase this value. A situation where
+				raising this value was required was for an
+				Internet access provider who was supporting
+				greater than 64 dial connections on a BSDI
+				platform. The actual size of the buffer for
+				temporary sockaddr's will be SOCK_BUF_PAGES
+                                multipled by your respective system's page
+				size. For example, use the config statement
+				"options SOCK_BUF_PAGES=2"
+                                to increase the buffer size to 2 pages.
 
 			LOCAL_VERSION	()
 				Used to specify local version information
Index: src/configs/bsdi-bsd.os-2.1
===================================================================
RCS file: /master/contrib/gated/src/configs/bsdi-bsd.os-2.1,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bsdi-bsd.os-2.1
--- 1.1.1.1	1995/11/22 19:22:05
+++ bsdi-bsd.os-2.1	1995/12/12 02:44:43
@@ -23,9 +23,11 @@
 
 yflags	-d -v
 
+installflags	-c -s -o bin -g bin -m 555
+
 mkdep	mkdep -flag -MM
 
-options GDCCORENAME=""core.%s""
+options GDCCORENAME=""%s.core""
 options	INCLUDE_UNISTD INCLUDE_PATHS GID_T=int
 options	POSIX_SIGNALS HAVE_WAITPID
 options	VARIABLE_MASKS SOCKET_LENGTHS SOCKADDR_DL INCLUDE_IF_DL
@@ -34,6 +36,7 @@
 options KRT_SOCKET_TYPE="PF_ROUTE, SOCK_RAW, AF_UNSPEC"
 options GDC_RESOURCE
 options	RT_N_MULTIPATH=4
+options	LOCAL_VERSION="(+ select 3.5B1 patches)"
 
 path_dump	/var/tmp/%s_dump
 path_dumpdir	/var/tmp
@@ -41,6 +44,6 @@
 path_version	/var/run/%s.version
 path_unix	/bsd
 
-protocols	bgp egp hello icmp rip ospf iso rdisc
+protocols	bgp egp icmp rip ospf rdisc
 
 gdc_group	wheel
Index: src/util/Makefile.template
===================================================================
RCS file: /master/contrib/gated/src/util/Makefile.template,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.template
--- Makefile.template	1995/11/22 19:22:11	1.1.1.1
+++ Makefile.template	1995/12/12 17:14:29
@@ -48,6 +48,7 @@
 CAT=@(CAT)
 CHGRP=@(CHGRP)
 CHMOD=@(CHMOD)
+CHOWN=@(CHOWN)
 DATE=@(DATE)
 TAGS=@(TAGS)
 TFLAGS=@(TFLAGS)
@@ -69,6 +70,7 @@
 #  Stuff for gdc
 GDC_MODE=@(GDC_MODE)
 GDC_GROUP=@(GDC_GROUP)
+GDC_USER=@(GDC_USER)
 
 # Stuff for ospf_monitor
 OSPFM_MODE=@(OSPFM_MODE)
@@ -212,7 +214,7 @@
 #	Man pages
 #
 	
-all::	man
+all::	man inst-man
 
 clean::	clean-man
 
@@ -417,9 +419,10 @@
 	MANDIR=${MANDIR} ./inst-man -${MANTYPE} ${G_MANS}
 
 ${DESTDIR}${BINDIR}/${GDC}:	${GDC}
-	-@${TOUCH} /tmp/$$ ; ${CHGRP} ${GDC_GROUP} /tmp/$$ ;\
+	-@${TOUCH} /tmp/$$ ; ${CHGRP} ${GDC_GROUP} /tmp/$$
+			     && ${CHOWN} ${GDC_USER} /tmp/$$ ;\
 		if [ $$? -eq 0 ]; then \
-			MODES="-m ${GDC_MODE} -g ${GDC_GROUP}" ; \
+			MODES="-m ${GDC_MODE} -o ${GDC_USER} -g ${GDC_GROUP}" ; \
 		else \
 			MODES= ; \
 		fi ; \
Index: src/util/config.awk
===================================================================
RCS file: /master/contrib/gated/src/util/config.awk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 config.awk
--- 1.1.1.1	1995/11/22 19:22:11
+++ config.awk	1995/12/12 02:44:49
@@ -83,8 +83,8 @@
 	VARS = "" ;
 
 	# Programs and flags used by make
-	vars = vars " ar awk .c.o cat cc cflags chgrp chmod" ;
-	VARS = VARS " AR AWK .C.O CAT CC CFLAGS CHGRP CHMOD" ;
+	vars = vars " ar awk .c.o cat cc cflags chgrp chmod chown" ;
+	VARS = VARS " AR AWK .C.O CAT CC CFLAGS CHGRP CHMOD CHOWN" ;
 	vars = vars " cwflags date head install installflags" ;
 	VARS = VARS " CWFLAGS DATE HEAD INSTALL INSTALLFLAGS" ;
 	vars = vars " ldflags ldothers lex lint lflags" ;
@@ -99,8 +99,8 @@
 	VARS = VARS " CONFIG_SCRIPT MKDEP SIGCONV.AWK VERSION.AWK TEMPLATE" ;
 
 	# Stuff used by gdc
-	vars = vars " gdc_mode gdc_group config_mode" ;
-	VARS = VARS " GDC_MODE GDC_GROUP CONFIG_MODE" ;
+	vars = vars " gdc_mode gdc_group gdc_user config_mode" ;
+	VARS = VARS " GDC_MODE GDC_GROUP GDC_USER CONFIG_MODE" ;
 
 	# Stuff used by ospf_monitor
 	vars = vars " ospfm_mode ospfm_user" ;
@@ -178,6 +178,7 @@
 	# Stuff for gdc
 	value["gdc_mode"] = "4750" ;
 	value["gdc_group"] = "gdmaint" ;
+	value["gdc_user"] = "root" ;
 	value["config_mode"] = "0664" ;
 
 	# Stuff for ospf_monitor
Index: src/util/inst-man.sh
===================================================================
RCS file: /master/contrib/gated/src/util/inst-man.sh,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 inst-man.sh
--- inst-man.sh	1995/11/22 19:22:12	1.1.1.1
+++ inst-man.sh	1995/12/12 17:34:04
@@ -71,9 +71,11 @@
 			;;
 
 		    BSD44)
-			echo "nroff -man $A > ${MANDIR}/cat$E/$F" | \
-			@(SED) -e 's%\.\([1-8]\)[1-8cn]*$%.0%' | \
-			sh -ve
+			G=`echo $F | @(SED) -e 's%\.\([1-8]\)[1-8cn]*%.0%'`
+			echo "nroff -man $A > ${MANDIR}/cat$E/$G"
+			nroff -man $A > ${MANDIR}/cat$E/$G
+			@(CHOWN) bin.bin ${MANDIR}/cat$E/$G
+			@(CHMOD) 444 ${MANDIR}/cat$E/$G
 			;;
 
 		    LOCAL)
