diff options
author | itojun <itojun@FreeBSD.org> | 2000-10-23 07:07:33 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 2000-10-23 07:07:33 +0000 |
commit | b7dce386972136bc112305a345dd6f9c480ac91a (patch) | |
tree | 0f9111f6ce873ea2fe81d9997d0cd7bca2cf86b9 /sys/netinet6/ip6_mroute.c | |
parent | 9b13a9d87f9d762af930834991a0e99fefcb5150 (diff) | |
download | FreeBSD-src-b7dce386972136bc112305a345dd6f9c480ac91a.zip FreeBSD-src-b7dce386972136bc112305a345dd6f9c480ac91a.tar.gz |
kame 1.32 -> 1.33
in add_m6fc(), set interface list for all cases.
in response to a report from Hoerdt Mickael.
kame 1.31 -> 1.32
discard PIM register if the version of the inner packet is incorrect (i.e. IPv6)
(according to clarfication of recent discussion in the IETF pim ML)
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 6bc7e6b..9b87900 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: ip6_mroute.c,v 1.24 2000/05/19 07:37:05 jinmei Exp $ */ +/* $KAME: ip6_mroute.c,v 1.33 2000/10/19 02:23:43 jinmei Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -74,6 +74,8 @@ #include <netinet6/pim6.h> #include <netinet6/pim6_var.h> +#include <net/net_osdep.h> + static MALLOC_DEFINE(M_MRTABLE, "mf6c", "multicast forwarding cache entry"); #define M_HASCL(m) ((m)->m_flags & M_EXT) @@ -760,6 +762,7 @@ add_m6fc(mfccp) rt->mf6c_origin = mfccp->mf6cc_origin; rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp; rt->mf6c_parent = mfccp->mf6cc_parent; + rt->mf6c_ifset = mfccp->mf6cc_ifset; /* initialize pkt counters per src-grp */ rt->mf6c_pkt_cnt = 0; rt->mf6c_byte_cnt = 0; @@ -783,6 +786,7 @@ add_m6fc(mfccp) rt->mf6c_origin = mfccp->mf6cc_origin; rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp; rt->mf6c_parent = mfccp->mf6cc_parent; + rt->mf6c_ifset = mfccp->mf6cc_ifset; /* initialize pkt counters per src-grp */ rt->mf6c_pkt_cnt = 0; rt->mf6c_byte_cnt = 0; @@ -935,6 +939,28 @@ ip6_mforward(ip6, ifp, m) 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 = splnet(); |