1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Drop packets to multicast address whose scop field contains the

reserved value 0.

MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2014-02-13 14:10:44 +00:00
parent d4f5f0007e
commit e4c77ca0c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261835

View File

@ -547,7 +547,18 @@ ip6_input(struct mbuf *m)
in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr);
goto bad;
}
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) &&
IPV6_ADDR_MC_SCOPE(&ip6->ip6_dst) == 0) {
/*
* RFC4291 2.7:
* Nodes must not originate a packet to a multicast address
* whose scop field contains the reserved value 0; if such
* a packet is received, it must be silently dropped.
*/
IP6STAT_INC(ip6s_badscope);
in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_addrerr);
goto bad;
}
#ifdef ALTQ
if (altq_input != NULL && (*altq_input)(m, AF_INET6) == 0) {
/* packet is dropped by traffic conditioner */