Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/netinet6 pullup 1.12 -> 1.13 (approved by releng-1-5)
details: https://anonhg.NetBSD.org/src/rev/1ae89c5c634b
branches: netbsd-1-5
changeset: 489308:1ae89c5c634b
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Aug 29 15:04:13 2000 +0000
description:
pullup 1.12 -> 1.13 (approved by releng-1-5)
> do not forward packets with unspecified source address (::).
> this is clarification recently made to RFC2460. sync with kame.
diffstat:
sys/netinet6/ip6_mroute.c | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diffs (57 lines):
diff -r 1ff9bac66ae1 -r 1ae89c5c634b sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Tue Aug 29 11:31:18 2000 +0000
+++ b/sys/netinet6/ip6_mroute.c Tue Aug 29 15:04:13 2000 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: ip6_mroute.c,v 1.12 2000/05/19 10:39:43 itojun Exp $ */
-/* $KAME: ip6_mroute.c,v 1.24 2000/05/19 07:37:05 jinmei Exp $ */
+/* $NetBSD: ip6_mroute.c,v 1.12.4.1 2000/08/29 15:04:13 itojun Exp $ */
+/* $KAME: ip6_mroute.c,v 1.31 2000/08/23 03:20:05 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -80,6 +80,8 @@
#include <netinet6/pim6.h>
#include <netinet6/pim6_var.h>
+#include <net/net_osdep.h>
+
#define M_HASCL(m) ((m)->m_flags & M_EXT)
static int ip6_mdq __P((struct mbuf *, struct ifnet *, struct mf6c *));
@@ -925,6 +927,7 @@
register struct mbuf *mm;
int s;
mifi_t mifi;
+ long time_second = time.tv_sec;
#ifdef MRT6DEBUG
if (mrt6debug & DEBUG_FORWARD)
@@ -943,6 +946,28 @@
ip6->ip6_hlim--;
/*
+ * Source address check: do not forward packets with unspecified
+ * source. It was discussed in July 2000, on ipngwg mailing list.
+ * This is rather more serious than unicast cases, because some
+ * MLD packets can be sent with the unspecified source address
+ * (although such packets must normally set 1 to the hop limit field).
+ */
+ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) {
+ ip6stat.ip6s_cantforward++;
+ if (ip6_log_time + ip6_log_interval < time_second) {
+ ip6_log_time = time_second;
+ log(LOG_DEBUG,
+ "cannot forward "
+ "from %s to %s nxt %d received on %s\n",
+ ip6_sprintf(&ip6->ip6_src),
+ ip6_sprintf(&ip6->ip6_dst),
+ ip6->ip6_nxt,
+ if_name(m->m_pkthdr.rcvif));
+ }
+ return 0;
+ }
+
+ /*
* Determine forwarding mifs from the forwarding cache table
*/
s = splsoftnet();
Home |
Main Index |
Thread Index |
Old Index