passive routes aren't trusted
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 13 Dec 1987 09:58:42 +0000 (01:58 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Sun, 13 Dec 1987 09:58:42 +0000 (01:58 -0800)
SCCS-vsn: sbin/routed/input.c 5.14

usr/src/sbin/routed/input.c

index 1b4abbb..5f6bf31 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)input.c    5.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)input.c    5.14 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -94,7 +94,8 @@ rip_input(from, size)
                if ((*afp->af_portcheck)(from) == 0)
                        return;
                if ((ifp = if_iflookup(from)) == 0 || (ifp->int_flags &
                if ((*afp->af_portcheck)(from) == 0)
                        return;
                if ((ifp = if_iflookup(from)) == 0 || (ifp->int_flags &
-                   (IFF_BROADCAST | IFF_POINTOPOINT | IFF_REMOTE)) == 0) {
+                   (IFF_BROADCAST | IFF_POINTOPOINT | IFF_REMOTE)) == 0 ||
+                   ifp->int_flags & IFF_PASSIVE) {
                        syslog(LOG_ERR, "trace command from unknown router, %s",
                            (*afswitch[from->sa_family].af_format)(from));
                        return;
                        syslog(LOG_ERR, "trace command from unknown router, %s",
                            (*afswitch[from->sa_family].af_format)(from));
                        return;
@@ -140,7 +141,8 @@ rip_input(from, size)
                 * and from those listed in /etc/gateways.
                 */
                if ((ifp = if_iflookup(from)) == 0 || (ifp->int_flags &
                 * and from those listed in /etc/gateways.
                 */
                if ((ifp = if_iflookup(from)) == 0 || (ifp->int_flags &
-                   (IFF_BROADCAST | IFF_POINTOPOINT | IFF_REMOTE)) == 0) {
+                   (IFF_BROADCAST | IFF_POINTOPOINT | IFF_REMOTE)) == 0 ||
+                   ifp->int_flags & IFF_PASSIVE) {
                        if (bcmp((char *)from, (char *)&badfrom,
                            sizeof(badfrom)) != 0) {
                                syslog(LOG_ERR,
                        if (bcmp((char *)from, (char *)&badfrom,
                            sizeof(badfrom)) != 0) {
                                syslog(LOG_ERR,