[Midnightbsd-cvs] src [7209] trunk/sbin/routed: dont allow traffic from outside interfaces on the output path
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Aug 5 20:05:30 EDT 2015
Revision: 7209
http://svnweb.midnightbsd.org/src/?rev=7209
Author: laffer1
Date: 2015-08-05 20:05:29 -0400 (Wed, 05 Aug 2015)
Log Message:
-----------
dont allow traffic from outside interfaces on the output path
Modified Paths:
--------------
trunk/sbin/routed/if.c
trunk/sbin/routed/input.c
trunk/sbin/routed/main.c
trunk/sbin/routed/output.c
trunk/sbin/routed/parms.c
trunk/sbin/routed/radix.c
trunk/sbin/routed/rdisc.c
trunk/sbin/routed/routed.8
trunk/sbin/routed/table.c
trunk/sbin/routed/trace.c
Modified: trunk/sbin/routed/if.c
===================================================================
--- trunk/sbin/routed/if.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/if.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -39,8 +39,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.3 $");
-#ident "$Revision: 1.3 $"
+__RCSID("$Revision: 2.27 $");
+#ident "$Revision: 2.27 $"
#endif
struct ifhead ifnet = LIST_HEAD_INITIALIZER(ifnet); /* all interfaces */
Modified: trunk/sbin/routed/input.c
===================================================================
--- trunk/sbin/routed/input.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/input.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -36,8 +36,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.3 $");
-#ident "$Revision: 1.3 $"
+__RCSID("$Revision: 2.26 $");
+#ident "$Revision: 2.26 $"
#endif
static void input(struct sockaddr_in *, struct interface *, struct interface *,
@@ -160,6 +160,12 @@
trace_rip("Recv", "from", from, sifp, rip, cc);
+ if (sifp == 0) {
+ trace_pkt(" discard a request from an indirect router"
+ " (possibly an attack)");
+ return;
+ }
+
if (rip->rip_vers == 0) {
msglim(&bad_router, FROM_NADDR,
"RIP version 0, cmd %d, packet received from %s",
Modified: trunk/sbin/routed/main.c
===================================================================
--- trunk/sbin/routed/main.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/main.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -47,8 +47,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.3 $");
-#ident "$Revision: 1.3 $"
+__RCSID("$Revision: 2.31 $");
+#ident "$Revision: 2.31 $"
#endif
pid_t mypid;
Modified: trunk/sbin/routed/output.c
===================================================================
--- trunk/sbin/routed/output.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/output.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -36,8 +36,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.27 $");
+#ident "$Revision: 2.27 $"
#endif
Modified: trunk/sbin/routed/parms.c
===================================================================
--- trunk/sbin/routed/parms.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/parms.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -38,8 +38,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.26 $");
+#ident "$Revision: 2.26 $"
#endif
Modified: trunk/sbin/routed/radix.c
===================================================================
--- trunk/sbin/routed/radix.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/radix.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -42,8 +42,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.23 $");
+#ident "$Revision: 2.23 $"
#endif
#define log(x, msg) syslog(x, msg)
Modified: trunk/sbin/routed/rdisc.c
===================================================================
--- trunk/sbin/routed/rdisc.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/rdisc.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -39,8 +39,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.27 $");
+#ident "$Revision: 2.27 $"
#endif
/* router advertisement ICMP packet */
Modified: trunk/sbin/routed/routed.8
===================================================================
--- trunk/sbin/routed/routed.8 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/routed.8 2015-08-06 00:05:29 UTC (rev 7209)
@@ -1,4 +1,4 @@
-.\" $Revision: 1.2 $
+.\" $Revision: 2.26 $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
Modified: trunk/sbin/routed/table.c
===================================================================
--- trunk/sbin/routed/table.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/table.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -36,8 +36,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.27 $");
+#ident "$Revision: 2.27 $"
#endif
static struct rt_spare *rts_better(struct rt_entry *);
Modified: trunk/sbin/routed/trace.c
===================================================================
--- trunk/sbin/routed/trace.c 2015-08-06 00:00:59 UTC (rev 7208)
+++ trunk/sbin/routed/trace.c 2015-08-06 00:05:29 UTC (rev 7209)
@@ -41,8 +41,8 @@
#elif defined(__FreeBSD__)
__RCSID("$MidnightBSD$");
#else
-__RCSID("$Revision: 1.2 $");
-#ident "$Revision: 1.2 $"
+__RCSID("$Revision: 2.27 $");
+#ident "$Revision: 2.27 $"
#endif
More information about the Midnightbsd-cvs
mailing list