rfc9777v3.txt   rfc9777.txt 
skipping to change at line 274 skipping to change at line 274
Upper-layer protocols and applications that run on a Multicast Upper-layer protocols and applications that run on a Multicast
Address Listener node use specific service interface calls (described Address Listener node use specific service interface calls (described
in Section 3) to ask the IP layer to enable or disable reception of in Section 3) to ask the IP layer to enable or disable reception of
packets sent to specific multicast addresses. The node keeps packets sent to specific multicast addresses. The node keeps
Multicast Address Listening state for each socket on which the Multicast Address Listening state for each socket on which the
service interface calls have been invoked (Section 4.1). In addition service interface calls have been invoked (Section 4.1). In addition
to this per-socket Multicast Address Listening state, a node must to this per-socket Multicast Address Listening state, a node must
also maintain or compute Multicast Address Listening state for each also maintain or compute Multicast Address Listening state for each
of its interfaces (Section 4.2). Conceptually, that state consists of its interfaces (Section 4.2). Conceptually, that state consists
of a set of records, with each record containing an IPv6 multicast of a set of records, with each record containing an IPv6 multicast
address, a filter mode, and a source list. The filter mode may be address, a filter-mode, and a source-list. The filter-mode may be
either INCLUDE or EXCLUDE. In INCLUDE mode, reception of packets either INCLUDE or EXCLUDE. In INCLUDE mode, reception of packets
sent to the specified multicast address is enabled only from the sent to the specified multicast address is enabled only from the
source addresses listed in the source list. In EXCLUDE mode, source addresses listed in the source-list. In EXCLUDE mode,
reception of packets sent to the given multicast address is enabled reception of packets sent to the given multicast address is enabled
from all source addresses except those listed in the source list. from all source addresses except those listed in the source-list.
At most, one record per multicast address exists for a given At most, one record per multicast address exists for a given
interface. This per-interface state is derived from the per-socket interface. This per-interface state is derived from the per-socket
state, but it may differ from the per-socket state when different state, but it may differ from the per-socket state when different
sockets have differing filter modes and/or source lists for the same sockets have differing filter-modes and/or source-lists for the same
multicast address and interface. After a multicast packet has been multicast address and interface. After a multicast packet has been
accepted from an interface by the IP layer, its subsequent delivery accepted from an interface by the IP layer, its subsequent delivery
to the application connected to a particular socket depends on the to the application connected to a particular socket depends on the
Multicast Address Listening state of that socket (and possibly also Multicast Address Listening state of that socket (and possibly also
on other conditions, such as what transport-layer port the socket is on other conditions, such as what transport-layer port the socket is
bound to). Note that MLDv2 messages are not subject to source bound to). Note that MLDv2 messages are not subject to source
filtering and must always be processed by hosts and routers. filtering and must always be processed by hosts and routers.
2.2. Exchanging Messages between the Querier and the Listening Nodes 2.2. Exchanging Messages between the Querier and the Listening Nodes
skipping to change at line 409 skipping to change at line 409
be sent, in order to ensure that a non-querier router keeps its state be sent, in order to ensure that a non-querier router keeps its state
synchronized with the current Querier (the non-querier router might synchronized with the current Querier (the non-querier router might
have missed the first query). Nevertheless, the timers should not be have missed the first query). Nevertheless, the timers should not be
lowered again, as a valid answer was already received. Therefore, in lowered again, as a valid answer was already received. Therefore, in
subsequent queries, the Querier sets the S flag. subsequent queries, the Querier sets the S flag.
2.3. Building Multicast Address Listening State on Multicast Routers 2.3. Building Multicast Address Listening State on Multicast Routers
Multicast routers that implement MLDv2 (whether they are in Querier Multicast routers that implement MLDv2 (whether they are in Querier
state or not) keep state per multicast address per attached link. state or not) keep state per multicast address per attached link.
This Multicast Address Listening state consists of a filter mode, a This Multicast Address Listening state consists of a filter-mode, a
filter timer, and a source list, with a timer associated to each filter timer, and a source-list, with a timer associated to each
source from the list. The filter mode is used to summarize the total source from the list. The filter-mode is used to summarize the total
listening state of a multicast address to a minimum set, such that listening state of a multicast address to a minimum set, such that
all nodes' listening states are respected. The filter mode may all nodes' listening states are respected. The filter-mode may
change in response to the reception of particular types of report change in response to the reception of particular types of report
messages or when certain timer conditions occur. messages or when certain timer conditions occur.
A router is in INCLUDE mode for a specific multicast address on a A router is in INCLUDE mode for a specific multicast address on a
given interface if all the listeners on the link interested in that given interface if all the listeners on the link interested in that
address are in INCLUDE mode. The router state is represented through address are in INCLUDE mode. The router state is represented through
the notation INCLUDE (A), where A is a list of sources, called the the notation INCLUDE (A), where A is a list of sources, called the
"Include List". The Include List is the set of sources that one or "Include List". The Include List is the set of sources that one or
more listeners on the link have requested to receive. All the more listeners on the link have requested to receive. All the
sources from the Include List will be forwarded by the router. Any sources from the Include List will be forwarded by the router. Any
skipping to change at line 455 skipping to change at line 455
the Include List, according to the received reports, is detailed in the Include List, according to the received reports, is detailed in
Sections 7.4.1 and 7.4.2. Sections 7.4.1 and 7.4.2.
A router is in EXCLUDE mode for a specific multicast address on a A router is in EXCLUDE mode for a specific multicast address on a
given interface if there is at least one listener in EXCLUDE mode for given interface if there is at least one listener in EXCLUDE mode for
that address on the link. When the first report is received from that address on the link. When the first report is received from
such a listener, the router sets the Filter Timer that corresponds to such a listener, the router sets the Filter Timer that corresponds to
that address. This timer is reset each time an EXCLUDE mode listener that address. This timer is reset each time an EXCLUDE mode listener
confirms its listening state through a Current-State Report. The confirms its listening state through a Current-State Report. The
timer is also updated when a listener, formerly in INCLUDE mode, timer is also updated when a listener, formerly in INCLUDE mode,
announces its filter mode change through a State-Change Report announces its filter-mode change through a State-Change Report
message. If the Filter Timer expires, it means that there are no message. If the Filter Timer expires, it means that there are no
more listeners in EXCLUDE mode on the link. In this case, the router more listeners in EXCLUDE mode on the link. In this case, the router
switches back to INCLUDE mode for that multicast address. switches back to INCLUDE mode for that multicast address.
When the router is in EXCLUDE mode, the router state is represented When the router is in EXCLUDE mode, the router state is represented
by the notation EXCLUDE (X,Y), where X is called the "Requested List" by the notation EXCLUDE (X,Y), where X is called the "Requested List"
and Y is called the "Exclude List". All sources, except those from and Y is called the "Exclude List". All sources, except those from
the Exclude List, will be forwarded by the router. The Requested the Exclude List, will be forwarded by the router. The Requested
List has no effect on forwarding. Nevertheless, the router has to List has no effect on forwarding. Nevertheless, the router has to
maintain the Requested List for two reasons: maintain the Requested List for two reasons:
skipping to change at line 551 skipping to change at line 551
address is desired on more than one interface, IPv6MulticastListen address is desired on more than one interface, IPv6MulticastListen
is invoked separately for each desired interface. is invoked separately for each desired interface.
* "IPv6 multicast address" is the multicast address to which the * "IPv6 multicast address" is the multicast address to which the
request pertains. If reception of more than one multicast address request pertains. If reception of more than one multicast address
on a given interface is desired, IPv6MulticastListen is invoked on a given interface is desired, IPv6MulticastListen is invoked
separately for each desired address. separately for each desired address.
* "filter-mode" may be either INCLUDE or EXCLUDE. In INCLUDE mode, * "filter-mode" may be either INCLUDE or EXCLUDE. In INCLUDE mode,
reception of packets sent to the specified multicast address is reception of packets sent to the specified multicast address is
requested only from the source addresses listed in the source list requested only from the source addresses listed in the source-list
parameter. In EXCLUDE mode, reception of packets sent to the parameter. In EXCLUDE mode, reception of packets sent to the
given multicast address is requested from all source addresses given multicast address is requested from all source addresses
except those listed in the source list parameter. except those listed in the source-list parameter.
* "source list" is an unordered list of zero or more unicast * "source-list" is an unordered list of zero or more unicast
addresses from which multicast reception is desired or not addresses from which multicast reception is desired or not
desired, depending on the filter mode. An implementation MAY desired, depending on the filter-mode. An implementation MAY
impose a limit on the size of source lists. When an operation impose a limit on the size of source-lists. When an operation
causes the source list size limit to be exceeded, the service causes the source-list size limit to be exceeded, the service
interface SHOULD return an error. interface SHOULD return an error.
For a given combination of socket, interface, and IPv6 multicast For a given combination of socket, interface, and IPv6 multicast
address, only a single filter mode and source list can be in effect address, only a single filter-mode and source-list can be in effect
at any one time. Nevertheless, either the filter mode or the source at any one time. Nevertheless, either the filter-mode or the source-
list, or both, may be changed by subsequent IPv6MulticastListen list, or both, may be changed by subsequent IPv6MulticastListen
requests that specify the same socket, interface, and IPv6 multicast requests that specify the same socket, interface, and IPv6 multicast
address. Each subsequent request completely replaces any earlier address. Each subsequent request completely replaces any earlier
request for the given socket, interface, and multicast address. request for the given socket, interface, and multicast address.
The MLDv1 protocol did not support source filters and had a simpler The MLDv1 protocol did not support source filters and had a simpler
service interface; it consisted of Start Listening and Stop Listening service interface; it consisted of Start Listening and Stop Listening
operations to enable and disable listening to a given multicast operations to enable and disable listening to a given multicast
address (from all sources) on a given interface. The equivalent address (from all sources) on a given interface. The equivalent
operations in the service interface are as follows. operations in the service interface are as follows.
skipping to change at line 587 skipping to change at line 587
The Start Listening operation is equivalent to: The Start Listening operation is equivalent to:
IPv6MulticastListen ( socket, interface, IPv6 multicast address, IPv6MulticastListen ( socket, interface, IPv6 multicast address,
EXCLUDE, {} ) EXCLUDE, {} )
and the Stop Listening operation is equivalent to: and the Stop Listening operation is equivalent to:
IPv6MulticastListen ( socket, interface, IPv6 multicast address, IPv6MulticastListen ( socket, interface, IPv6 multicast address,
INCLUDE, {} ) INCLUDE, {} )
where {} is an empty source list. where {} is an empty source-list.
An example of an API that provides the capabilities outlined in this An example of an API that provides the capabilities outlined in this
service interface is given in [RFC3678]. service interface is given in [RFC3678].
4. Multicast Address Listening State Maintained by Nodes 4. Multicast Address Listening State Maintained by Nodes
4.1. Per-Socket State 4.1. Per-Socket State
For each socket on which IPv6MulticastListen has been invoked, the For each socket on which IPv6MulticastListen has been invoked, the
node records the desired Multicast Address Listening state for that node records the desired Multicast Address Listening state for that
socket. That state conceptually consists of a set of records of the socket. That state conceptually consists of a set of records of the
form: form:
(interface, IPv6 multicast address, filter mode, source list) (interface, IPv6 multicast address, filter-mode, source-list)
The per-socket state evolves in response to each invocation of The per-socket state evolves in response to each invocation of
IPv6MulticastListen on the socket, as follows: IPv6MulticastListen on the socket, as follows:
* If the requested filter mode is INCLUDE and the requested source * If the requested filter-mode is INCLUDE and the requested source-
list is empty, then the entry that corresponds to the requested list is empty, then the entry that corresponds to the requested
interface and multicast address is deleted, if present. If no interface and multicast address is deleted, if present. If no
such entry is present, the request has no effect. such entry is present, the request has no effect.
* If the requested filter mode is EXCLUDE or the requested source * If the requested filter-mode is EXCLUDE or the requested source-
list is non-empty, then the entry that corresponds to the list is non-empty, then the entry that corresponds to the
requested interface and multicast address, if present, is changed requested interface and multicast address, if present, is changed
to contain the requested filter mode and source list. If no such to contain the requested filter-mode and source-list. If no such
entry is present, a new entry is created, using the parameters entry is present, a new entry is created, using the parameters
specified in the request. specified in the request.
4.2. Per-Interface State 4.2. Per-Interface State
In addition to the per-socket Multicast Address Listening state, a In addition to the per-socket Multicast Address Listening state, a
node must also maintain or compute Multicast Address Listening state node must also maintain or compute Multicast Address Listening state
for each of its interfaces. That state conceptually consists of a for each of its interfaces. That state conceptually consists of a
set of records of the form: set of records of the form:
(IPv6 multicast address, filter mode, source list) (IPv6 multicast address, filter-mode, source-list)
At most, one record per multicast address exists for a given At most, one record per multicast address exists for a given
interface. This per-interface state is derived from the per-socket interface. This per-interface state is derived from the per-socket
state, but it may differ from the per-socket state when different state, but it may differ from the per-socket state when different
sockets have differing filter modes and/or source lists for the same sockets have differing filter-modes and/or source-lists for the same
multicast address and interface. For example, suppose one multicast address and interface. For example, suppose one
application or process invokes the following operation on socket s1: application or process invokes the following operation on socket s1:
IPv6MulticastListen ( s1, i, m, INCLUDE, {a, b, c} ) IPv6MulticastListen ( s1, i, m, INCLUDE, {a, b, c} )
requesting reception on interface i of packets sent to multicast requesting reception on interface i of packets sent to multicast
address m, only if they come from the sources a, b, or c. Suppose address m, only if they come from the sources a, b, or c. Suppose
another application or process invokes the following operation on another application or process invokes the following operation on
socket s2: socket s2:
IPv6MulticastListen ( s2, i, m, INCLUDE, {b, c, d} ) IPv6MulticastListen ( s2, i, m, INCLUDE, {b, c, d} )
requesting reception on the same interface i of packets sent to the requesting reception on the same interface i of packets sent to the
same multicast address m, only if they come from sources b, c, or d. same multicast address m, only if they come from sources b, c, or d.
In order to satisfy the reception requirements of both sockets, it is In order to satisfy the reception requirements of both sockets, it is
necessary for interface i to receive packets sent to m from any one necessary for interface i to receive packets sent to m from any one
of the sources a, b, c, or d. Thus, in this example, the listening of the sources a, b, c, or d. Thus, in this example, the listening
state of interface i for multicast address m has filter mode INCLUDE state of interface i for multicast address m has filter-mode INCLUDE
and source list {a, b, c, d}. and source-list {a, b, c, d}.
After a multicast packet has been accepted from an interface by the After a multicast packet has been accepted from an interface by the
IP layer, its subsequent delivery to the application or process that IP layer, its subsequent delivery to the application or process that
listens on a particular socket depends on the Multicast Address listens on a particular socket depends on the Multicast Address
Listening state of that socket (and possibly also on other Listening state of that socket (and possibly also on other
conditions, such as what transport-layer port the socket is bound conditions, such as what transport-layer port the socket is bound
to). So, in the above example, if a packet arrives on interface i, to). So, in the above example, if a packet arrives on interface i,
destined to multicast address m, with source address a, it may be destined to multicast address m, with source address a, it may be
delivered on socket s1 but not on socket s2. Note that MLDv2 delivered on socket s1 but not on socket s2. Note that MLDv2
messages are not subject to source filtering and must always be messages are not subject to source filtering and must always be
skipping to change at line 677 skipping to change at line 677
the given interface; packets sent to that multicast address could be the given interface; packets sent to that multicast address could be
delivered to all sockets, whether they had started to listen or not. delivered to all sockets, whether they had started to listen or not.
The general rules for deriving the per-interface state from the per- The general rules for deriving the per-interface state from the per-
socket state are as follows: for each distinct (interface, IPv6 socket state are as follows: for each distinct (interface, IPv6
multicast address) pair that appears in any per-socket state, a per- multicast address) pair that appears in any per-socket state, a per-
interface record is created for that multicast address on that interface record is created for that multicast address on that
interface. Considering all socket records that contain the same interface. Considering all socket records that contain the same
(interface, IPv6 multicast address) pair, (interface, IPv6 multicast address) pair,
* if any such record has a filter mode of EXCLUDE, then the filter * if any such record has a filter-mode of EXCLUDE, then the filter-
mode of the interface record is EXCLUDE, and the source list of mode of the interface record is EXCLUDE, and the source-list of
the interface record is the intersection of the source lists of the interface record is the intersection of the source-lists of
all socket records in EXCLUDE mode, minus those source addresses all socket records in EXCLUDE mode, minus those source addresses
that appear in any socket record in INCLUDE mode. For example, if that appear in any socket record in INCLUDE mode. For example, if
the socket records for multicast address m on interface i are: the socket records for multicast address m on interface i are:
- from socket s1: ( i, m, EXCLUDE, {a, b, c, d} ) - from socket s1: ( i, m, EXCLUDE, {a, b, c, d} )
- from socket s2: ( i, m, EXCLUDE, {b, c, d, e} ) - from socket s2: ( i, m, EXCLUDE, {b, c, d, e} )
- from socket s3: ( i, m, INCLUDE, {d, e, f} ) - from socket s3: ( i, m, INCLUDE, {d, e, f} )
skipping to change at line 702 skipping to change at line 702
- ( m, EXCLUDE, {b, c} ) - ( m, EXCLUDE, {b, c} )
If a fourth socket is added, such as: If a fourth socket is added, such as:
- From socket s4: ( i, m, EXCLUDE, {} ) - From socket s4: ( i, m, EXCLUDE, {} )
then the interface record becomes: then the interface record becomes:
- ( m, EXCLUDE, {} ) - ( m, EXCLUDE, {} )
* if all such records have a filter mode of INCLUDE, then the filter * if all such records have a filter-mode of INCLUDE, then the
mode of the interface record is INCLUDE, and the source list of filter-mode of the interface record is INCLUDE, and the source-
the interface record is the union of the source lists of all the list of the interface record is the union of the source-lists of
socket records. For example, if the socket records for multicast all the socket records. For example, if the socket records for
address m on interface i are: multicast address m on interface i are:
- from socket s1: ( i, m, INCLUDE, {a, b, c} ) - from socket s1: ( i, m, INCLUDE, {a, b, c} )
- from socket s2: ( i, m, INCLUDE, {b, c, d} ) - from socket s2: ( i, m, INCLUDE, {b, c, d} )
- from socket s3: ( i, m, INCLUDE, {e, f} ) - from socket s3: ( i, m, INCLUDE, {e, f} )
then the corresponding interface record on interface i is: then the corresponding interface record on interface i is:
- ( m, INCLUDE, {a, b, c, d, e, f} ) - ( m, INCLUDE, {a, b, c, d, e, f} )
An implementation MUST NOT use an EXCLUDE interface record for a An implementation MUST NOT use an EXCLUDE interface record for a
multicast address if all sockets for this multicast address are in multicast address if all sockets for this multicast address are in
INCLUDE state. If system resource limits are reached when a per- INCLUDE state. If system resource limits are reached when a per-
interface state source list is calculated, an error MUST be interface state source-list is calculated, an error MUST be
returned to the application which requested the operation. returned to the application which requested the operation.
The above rules for deriving the per-interface state are The above rules for deriving the per-interface state are
(re)evaluated whenever an IPv6MulticastListen invocation modifies the (re)evaluated whenever an IPv6MulticastListen invocation modifies the
per-socket state by adding, deleting, or modifying a per-socket state per-socket state by adding, deleting, or modifying a per-socket state
record. Note that a change of the per-socket state does not record. Note that a change of the per-socket state does not
necessarily result in a change of the per-interface state. necessarily result in a change of the per-interface state.
5. Message Formats 5. Message Formats
skipping to change at line 1169 skipping to change at line 1169
There are a number of different types of Multicast Address Records There are a number of different types of Multicast Address Records
that may be included in a Report message: that may be included in a Report message:
* A "Current-State Record" is sent by a node in response to a Query * A "Current-State Record" is sent by a node in response to a Query
received on an interface. It reports the current listening state received on an interface. It reports the current listening state
of that interface, with respect to a single multicast address. of that interface, with respect to a single multicast address.
The Record Type of a Current-State Record may be one of the The Record Type of a Current-State Record may be one of the
following two values: following two values:
1. MODE_IS_INCLUDE - indicates that the interface has a filter 1. MODE_IS_INCLUDE - indicates that the interface has a filter-
mode of INCLUDE for the specified multicast address. The mode of INCLUDE for the specified multicast address. The
Source Address [i] fields in this Multicast Address Record Source Address [i] fields in this Multicast Address Record
contain the interface's source list for the specified contain the interface's source-list for the specified
multicast address. A MODE_IS_INCLUDE Record is never sent multicast address. A MODE_IS_INCLUDE Record is never sent
with an empty source list. with an empty source-list.
2. MODE_IS_EXCLUDE - indicates that the interface has a filter 2. MODE_IS_EXCLUDE - indicates that the interface has a filter-
mode of EXCLUDE for the specified multicast address. The mode of EXCLUDE for the specified multicast address. The
Source Address [i] fields in this Multicast Address Record Source Address [i] fields in this Multicast Address Record
contain the interface's source list for the specified contain the interface's source-list for the specified
multicast address, if it is non-empty. An SSM-aware host multicast address, if it is non-empty. An SSM-aware host
SHOULD NOT send a MODE_IS_EXCLUDE record type for multicast SHOULD NOT send a MODE_IS_EXCLUDE record type for multicast
addresses that fall within the SSM address range as they will addresses that fall within the SSM address range as they will
be ignored by SSM-aware routers [RFC4604]. be ignored by SSM-aware routers [RFC4604].
* A "Filter-Mode-Change Record" is sent by a node whenever a local * A "Filter-Mode-Change Record" is sent by a node whenever a local
invocation of IPv6MulticastListen causes a change of the filter invocation of IPv6MulticastListen causes a change of the filter-
mode (i.e., a change from INCLUDE to EXCLUDE, or from EXCLUDE to mode (i.e., a change from INCLUDE to EXCLUDE, or from EXCLUDE to
INCLUDE) of the interface-level state entry for a particular INCLUDE) of the interface-level state entry for a particular
multicast address, whether the source list changes at the same multicast address, whether the source-list changes at the same
time or not. The Record is included in a Report sent from the time or not. The Record is included in a Report sent from the
interface on which the change occurred. The Record Type of a interface on which the change occurred. The Record Type of a
Filter-Mode-Change Record may be one of the following two values: Filter-Mode-Change Record may be one of the following two values:
3. CHANGE_TO_INCLUDE_MODE - indicates that the interface has 3. CHANGE_TO_INCLUDE_MODE - indicates that the interface has
changed to INCLUDE filter mode for the specified multicast changed to INCLUDE filter-mode for the specified multicast
address. The Source Address [i] fields in this Multicast address. The Source Address [i] fields in this Multicast
Address Record contain the interface's new source list for the Address Record contain the interface's new source-list for the
specified multicast address, if it is non-empty. specified multicast address, if it is non-empty.
4. CHANGE_TO_EXCLUDE_MODE - indicates that the interface has 4. CHANGE_TO_EXCLUDE_MODE - indicates that the interface has
changed to EXCLUDE filter mode for the specified multicast changed to EXCLUDE filter-mode for the specified multicast
address. The Source Address [i] fields in this Multicast address. The Source Address [i] fields in this Multicast
Address Record contain the interface's new source list for the Address Record contain the interface's new source-list for the
specified multicast address, if it is non-empty. An SSM-aware specified multicast address, if it is non-empty. An SSM-aware
host SHOULD NOT send a CHANGE_TO_EXCLUDE_MODE record type for host SHOULD NOT send a CHANGE_TO_EXCLUDE_MODE record type for
multicast addresses that fall within the SSM address range. multicast addresses that fall within the SSM address range.
* A "Source-List-Change Record" is sent by a node whenever a local * A "Source-List-Change Record" is sent by a node whenever a local
invocation of IPv6MulticastListen causes a change of source list invocation of IPv6MulticastListen causes a change of source-list
that is not coincident with a change of filter mode, of the that is not coincident with a change of filter-mode, of the
interface-level state entry for a particular multicast address. interface-level state entry for a particular multicast address.
The Record is included in a Report sent from the interface on The Record is included in a Report sent from the interface on
which the change occurred. The Record Type of a Source-List- which the change occurred. The Record Type of a Source-List-
Change Record may be one of the following two values: Change Record may be one of the following two values:
5. ALLOW_NEW_SOURCES - indicates that the Source Address [i] 5. ALLOW_NEW_SOURCES - indicates that the Source Address [i]
fields in this Multicast Address Record contain a list of the fields in this Multicast Address Record contain a list of the
additional sources that the node wishes to listen to, for additional sources that the node wishes to listen to, for
packets sent to the specified multicast address. If the packets sent to the specified multicast address. If the
change was to an INCLUDE source list, these are the addresses change was to an INCLUDE source-list, these are the addresses
that were added to the list; if the change was to an EXCLUDE that were added to the list; if the change was to an EXCLUDE
source list, these are the addresses that were deleted from source-list, these are the addresses that were deleted from
the list. the list.
6. BLOCK_OLD_SOURCES - indicates that the Source Address [i] 6. BLOCK_OLD_SOURCES - indicates that the Source Address [i]
fields in this Multicast Address Record contain a list of the fields in this Multicast Address Record contain a list of the
sources that the node no longer wishes to listen to, for sources that the node no longer wishes to listen to, for
packets sent to the specified multicast address. If the packets sent to the specified multicast address. If the
change was to an INCLUDE source list, these are the addresses change was to an INCLUDE source-list, these are the addresses
that were deleted from the list; if the change was to an that were deleted from the list; if the change was to an
EXCLUDE source list, these are the addresses that were added EXCLUDE source-list, these are the addresses that were added
to the list. to the list.
If a change of source list results in both allowing new sources and If a change of source-list results in both allowing new sources and
blocking old sources, then two Multicast Address Records are sent for blocking old sources, then two Multicast Address Records are sent for
the same multicast address, one of type ALLOW_NEW_SOURCES and one of the same multicast address, one of type ALLOW_NEW_SOURCES and one of
type BLOCK_OLD_SOURCES. type BLOCK_OLD_SOURCES.
We use the term "State-Change Record" to refer to either a Filter We use the term "State-Change Record" to refer to either a Filter
Mode Change Record or a Source-List-Change Record. Mode Change Record or a Source-List-Change Record.
Multicast Address Records with an unrecognized Record Type value MUST Multicast Address Records with an unrecognized Record Type value MUST
be silently ignored, with the rest of the report being processed. be silently ignored, with the rest of the report being processed.
skipping to change at line 1395 skipping to change at line 1395
6.1. Action on Change of Per-Interface State 6.1. Action on Change of Per-Interface State
An invocation of IPv6MulticastListen may cause the Multicast Address An invocation of IPv6MulticastListen may cause the Multicast Address
Listening state of an interface to change, according to the rules in Listening state of an interface to change, according to the rules in
Section 4.2. Each such change affects the per-interface entry for a Section 4.2. Each such change affects the per-interface entry for a
single multicast address. single multicast address.
A change of per-interface state causes the node to immediately A change of per-interface state causes the node to immediately
transmit a State-Change Report from that interface. The type and transmit a State-Change Report from that interface. The type and
contents of the Multicast Address Record(s) in that Report are contents of the Multicast Address Record(s) in that Report are
determined by comparing the filter mode and source list for the determined by comparing the filter-mode and source-list for the
affected multicast address before and after the change, according to affected multicast address before and after the change, according to
Table 1. If no per-interface state existed for that multicast Table 1. If no per-interface state existed for that multicast
address before the change (i.e., the change consisted of creating a address before the change (i.e., the change consisted of creating a
new per-interface record), or if no state exists after the change new per-interface record), or if no state exists after the change
(i.e., the change consisted of deleting a per-interface record), then (i.e., the change consisted of deleting a per-interface record), then
the "non-existent" state is considered to have an INCLUDE filter mode the "non-existent" state is considered to have an INCLUDE filter-mode
and an empty source list. and an empty source-list.
+=============+=============+==========================+ +=============+=============+==========================+
| Old State | New State | State-Change Record Sent | | Old State | New State | State-Change Record Sent |
+=============+=============+==========================+ +=============+=============+==========================+
| INCLUDE (A) | INCLUDE (B) | ALLOW (B-A), BLOCK (A-B) | | INCLUDE (A) | INCLUDE (B) | ALLOW (B-A), BLOCK (A-B) |
+-------------+-------------+--------------------------+ +-------------+-------------+--------------------------+
| EXCLUDE (A) | EXCLUDE (B) | ALLOW (A-B), BLOCK (B-A) | | EXCLUDE (A) | EXCLUDE (B) | ALLOW (A-B), BLOCK (B-A) |
+-------------+-------------+--------------------------+ +-------------+-------------+--------------------------+
| INCLUDE (A) | EXCLUDE (B) | TO_EX (B) | | INCLUDE (A) | EXCLUDE (B) | TO_EX (B) |
+-------------+-------------+--------------------------+ +-------------+-------------+--------------------------+
| EXCLUDE (A) | INCLUDE (B) | TO_IN (B) | | EXCLUDE (A) | INCLUDE (B) | TO_IN (B) |
+-------------+-------------+--------------------------+ +-------------+-------------+--------------------------+
Table 1: State-Change Record Transmission Logic Table 1: State-Change Record Transmission Logic
If the computed source list for either an ALLOW or a BLOCK State- If the computed source-list for either an ALLOW or a BLOCK State-
Change Record is empty, that record is omitted from the Report. Change Record is empty, that record is omitted from the Report.
To cover the possibility of the State-Change Report being missed by To cover the possibility of the State-Change Report being missed by
one or more multicast routers, [Robustness Variable] - 1 one or more multicast routers, [Robustness Variable] - 1
retransmissions are scheduled, through a Retransmission Timer, at retransmissions are scheduled, through a Retransmission Timer, at
intervals chosen at random from the range (0, [Unsolicited Report intervals chosen at random from the range (0, [Unsolicited Report
Interval]). Interval]).
If more changes to the same per-interface state entry occur before If more changes to the same per-interface state entry occur before
all the retransmissions of the State-Change Report for the first all the retransmissions of the State-Change Report for the first
skipping to change at line 1464 skipping to change at line 1464
successive state changes do not break the protocol robustness. successive state changes do not break the protocol robustness.
Sources in retransmission state can be kept in a per-multicast- Sources in retransmission state can be kept in a per-multicast-
address Retransmission List, with a Source Retransmission Counter address Retransmission List, with a Source Retransmission Counter
associated to each source in the list. When a source is included in associated to each source in the list. When a source is included in
the list, its counter is set to [Robustness Variable]. Each time a the list, its counter is set to [Robustness Variable]. Each time a
State-Change Report is sent, the counter is decreased by one unit. State-Change Report is sent, the counter is decreased by one unit.
When the counter reaches zero, the source is deleted from the When the counter reaches zero, the source is deleted from the
Retransmission List for that multicast address. Retransmission List for that multicast address.
If the per-interface listening change that triggers the new report is If the per-interface listening change that triggers the new report is
a filter mode change, then the next [Robustness Variable] State- a filter-mode change, then the next [Robustness Variable] State-
Change Reports will include a Filter-Mode-Change Record. This Change Reports will include a Filter-Mode-Change Record. This
applies even if any number of source list changes occur in that applies even if any number of source-list changes occur in that
period. The node has to maintain retransmission state for the period. The node has to maintain retransmission state for the
multicast address until the [Robustness Variable] State-Change multicast address until the [Robustness Variable] State-Change
Reports have been sent. This can be done through a per-multicast- Reports have been sent. This can be done through a per-multicast-
address Filter Mode Retransmission Counter. When the filter mode address Filter Mode Retransmission Counter. When the filter-mode
changes, the counter is set to [Robustness Variable]. Each time a changes, the counter is set to [Robustness Variable]. Each time a
State-Change Report is sent the counter is decreased by one unit. State-Change Report is sent the counter is decreased by one unit.
When the counter reaches zero, i.e., [Robustness Variable] State- When the counter reaches zero, i.e., [Robustness Variable] State-
Change Reports with Filter-Mode-Change Records have been transmitted Change Reports with Filter-Mode-Change Records have been transmitted
after the last filter mode change, and if source list changes have after the last filter-mode change, and if source-list changes have
resulted in additional reports being scheduled, then the next State- resulted in additional reports being scheduled, then the next State-
Change Report will include Source-List-Change Records. Change Report will include Source-List-Change Records.
Each time a per-interface listening state change triggers the Each time a per-interface listening state change triggers the
immediate transmission of a new State-Change Report, its contents are immediate transmission of a new State-Change Report, its contents are
determined as follows. If the report should contain a Filter-Mode- determined as follows. If the report should contain a Filter-Mode-
Change Record, i.e., the Filter Mode Retransmission Counter for that Change Record, i.e., the Filter Mode Retransmission Counter for that
multicast address has a value higher than zero, then, if the current multicast address has a value higher than zero, then, if the current
filter mode of the interface is INCLUDE, a TO_IN record is included filter-mode of the interface is INCLUDE, a TO_IN record is included
in the report; otherwise, a TO_EX record is included. If instead the in the report; otherwise, a TO_EX record is included. If instead the
report should contain Source-List-Change Records, i.e., the Filter report should contain Source-List-Change Records, i.e., the Filter
Mode Retransmission Counter for that multicast address is zero, an Mode Retransmission Counter for that multicast address is zero, an
ALLOW and a BLOCK record is included. The contents of these records ALLOW and a BLOCK record is included. The contents of these records
are built according Table 2. are built according Table 2.
+========+=======================================================+ +========+=======================================================+
| Record | Sources Included | | Record | Sources Included |
+========+=======================================================+ +========+=======================================================+
| TO_IN | All in the current per-interface state that must be | | TO_IN | All in the current per-interface state that must be |
skipping to change at line 1508 skipping to change at line 1508
| | blocked. | | | blocked. |
+--------+-------------------------------------------------------+ +--------+-------------------------------------------------------+
| ALLOW | All with retransmission state (i.e., all sources from | | ALLOW | All with retransmission state (i.e., all sources from |
| | the Retransmission List) that must be forwarded. | | | the Retransmission List) that must be forwarded. |
+--------+-------------------------------------------------------+ +--------+-------------------------------------------------------+
| BLOCK | All with retransmission state that must be blocked. | | BLOCK | All with retransmission state that must be blocked. |
+--------+-------------------------------------------------------+ +--------+-------------------------------------------------------+
Table 2: Per-Interface State-Change Report Contents Table 2: Per-Interface State-Change Report Contents
If the computed source list for either an ALLOW or a BLOCK record is If the computed source-list for either an ALLOW or a BLOCK record is
empty, that record is omitted from the State-Change Report. empty, that record is omitted from the State-Change Report.
| Note: When the first State-Change Report is sent, the non- | Note: When the first State-Change Report is sent, the non-
| existent pending report to merge with can be treated as a | existent pending report to merge with can be treated as a
| Source-Change Report with empty ALLOW and BLOCK records (no | Source-Change Report with empty ALLOW and BLOCK records (no
| sources have retransmission state). | sources have retransmission state).
The building of a scheduled State-Change Report, triggered by the The building of a scheduled State-Change Report, triggered by the
firing of a Retransmission Timer, instead of a per-interface firing of a Retransmission Timer, instead of a per-interface
listening state change, is described in Section 6.3. listening state change, is described in Section 6.3.
skipping to change at line 1585 skipping to change at line 1585
3. If the received Query is a Multicast Address Specific Query or a 3. If the received Query is a Multicast Address Specific Query or a
Multicast Address and Source Specific Query and there is no Multicast Address and Source Specific Query and there is no
pending response to a previous Query for this multicast address, pending response to a previous Query for this multicast address,
then the Multicast Address Timer is used to schedule a report. then the Multicast Address Timer is used to schedule a report.
If the received Query is a Multicast Address and Source Specific If the received Query is a Multicast Address and Source Specific
Query, the list of queried sources is recorded for use when Query, the list of queried sources is recorded for use when
generating a response. generating a response.
4. If there is already a pending response to a previous Query 4. If there is already a pending response to a previous Query
scheduled for this multicast address, and either the new Query is scheduled for this multicast address, and either the new Query is
a Multicast Address Specific Query or the recorded source list a Multicast Address Specific Query or the recorded source-list
associated with the multicast address is empty, then the associated with the multicast address is empty, then the
multicast address source list is cleared and a single response is multicast address source-list is cleared and a single response is
scheduled, using the Multicast Address Timer. The new response scheduled, using the Multicast Address Timer. The new response
is scheduled to be sent at the earliest of the remaining time for is scheduled to be sent at the earliest of the remaining time for
the pending report and the selected delay. the pending report and the selected delay.
5. If the received Query is a Multicast Address and Source Specific 5. If the received Query is a Multicast Address and Source Specific
Query and there is a pending response for this multicast address Query and there is a pending response for this multicast address
with a non-empty source list, then the multicast address source with a non-empty source-list, then the multicast address source-
list is augmented to contain the list of sources in the new list is augmented to contain the list of sources in the new
Query, and a single response is scheduled using the Multicast Query, and a single response is scheduled using the Multicast
Address Timer. The new response is scheduled to be sent at the Address Timer. The new response is scheduled to be sent at the
earliest of the remaining time for the pending report and the earliest of the remaining time for the pending report and the
selected delay. selected delay.
6.3. Action on Timer Expiration 6.3. Action on Timer Expiration
There are several timers that, upon expiration, trigger protocol There are several timers that, upon expiration, trigger protocol
actions on an MLDv2 Multicast Address Listener node. All these actions on an MLDv2 Multicast Address Listener node. All these
actions are related to pending reports scheduled by the node. actions are related to pending reports scheduled by the node.
1. If the expired timer is the Interface Timer (i.e., there is a 1. If the expired timer is the Interface Timer (i.e., there is a
pending response to a General Query), then one Current-State pending response to a General Query), then one Current-State
Record is sent for each multicast address for which the specified Record is sent for each multicast address for which the specified
interface has listening state, as described in Section 4.2. The interface has listening state, as described in Section 4.2. The
Current-State Record carries the multicast address and its Current-State Record carries the multicast address and its
associated filter mode (MODE_IS_INCLUDE or MODE_IS_EXCLUDE) and associated filter-mode (MODE_IS_INCLUDE or MODE_IS_EXCLUDE) and
source list. Multiple Current-State Records are packed into source-list. Multiple Current-State Records are packed into
individual Report messages, to the extent possible. individual Report messages, to the extent possible.
This naive algorithm may result in bursts of packets when a node This naive algorithm may result in bursts of packets when a node
listens to a large number of multicast addresses. Instead of listens to a large number of multicast addresses. Instead of
using a single Interface Timer, implementations are recommended using a single Interface Timer, implementations are recommended
to spread transmission of such Report messages over the interval to spread transmission of such Report messages over the interval
(0, [Maximum Response Delay]). Note that any such implementation (0, [Maximum Response Delay]). Note that any such implementation
MUST avoid the "ack-implosion" problem, i.e., MUST NOT send a MUST avoid the "ack-implosion" problem, i.e., MUST NOT send a
Report immediately upon reception of a General Query. Report immediately upon reception of a General Query.
2. If the expired timer is a Multicast Address Timer and the list of 2. If the expired timer is a Multicast Address Timer and the list of
recorded sources for that multicast address is empty (i.e., there recorded sources for that multicast address is empty (i.e., there
is a pending response to a Multicast Address Specific Query), is a pending response to a Multicast Address Specific Query),
then if, and only if, the interface has listening state for that then if, and only if, the interface has listening state for that
multicast address, a single Current-State Record is sent for that multicast address, a single Current-State Record is sent for that
address. The Current-State Record carries the multicast address address. The Current-State Record carries the multicast address
and its associated filter mode (MODE_IS_INCLUDE or and its associated filter-mode (MODE_IS_INCLUDE or
MODE_IS_EXCLUDE) and source list, if any. MODE_IS_EXCLUDE) and source-list, if any.
3. If the expired timer is a Multicast Address Timer and the list of 3. If the expired timer is a Multicast Address Timer and the list of
recorded sources for that multicast address is non-empty (i.e., recorded sources for that multicast address is non-empty (i.e.,
there is a pending response to a Multicast Address and Source there is a pending response to a Multicast Address and Source
Specific Query), then if, and only if, the interface has Specific Query), then if, and only if, the interface has
listening state for that multicast address, the contents of the listening state for that multicast address, the contents of the
corresponding Current-State Record are determined from the per- corresponding Current-State Record are determined from the per-
interface state and the pending response record, as specified in interface state and the pending response record, as specified in
Table 3. Table 3.
skipping to change at line 1655 skipping to change at line 1655
+=====================+=========================+===============+ +=====================+=========================+===============+
| INCLUDE (A) | B | IS_IN (A*B) | | INCLUDE (A) | B | IS_IN (A*B) |
+---------------------+-------------------------+---------------+ +---------------------+-------------------------+---------------+
| EXCLUDE (A) | B | IS_IN (B-A) | | EXCLUDE (A) | B | IS_IN (B-A) |
+---------------------+-------------------------+---------------+ +---------------------+-------------------------+---------------+
Table 3: Determining Contents of Current-State Record Table 3: Determining Contents of Current-State Record
If the resulting Current-State Record has an empty set of source If the resulting Current-State Record has an empty set of source
addresses, then no response is sent. After the required Report addresses, then no response is sent. After the required Report
messages have been generated, the source lists associated with messages have been generated, the source-lists associated with
any reported multicast addresses are cleared. any reported multicast addresses are cleared.
4. If the expired timer is a Retransmission Timer for a multicast 4. If the expired timer is a Retransmission Timer for a multicast
address (i.e., there is a pending State-Change Report for that address (i.e., there is a pending State-Change Report for that
multicast address), the contents of the report are determined as multicast address), the contents of the report are determined as
follows. If the report should contain a Filter-Mode-Change follows. If the report should contain a Filter-Mode-Change
Record, i.e., the Filter Mode Retransmission Counter for that Record, i.e., the Filter Mode Retransmission Counter for that
multicast address has a value higher than zero, then, if the multicast address has a value higher than zero, then, if the
current filter mode of the interface is INCLUDE, a TO_IN record current filter-mode of the interface is INCLUDE, a TO_IN record
is included in the report; otherwise a TO_EX record is included. is included in the report; otherwise a TO_EX record is included.
In both cases, the Filter Mode Retransmission Counter for that In both cases, the Filter Mode Retransmission Counter for that
multicast address is decremented by one unit after the multicast address is decremented by one unit after the
transmission of the report. transmission of the report.
If instead the report should contain Source-List-Change Records, If instead the report should contain Source-List-Change Records,
i.e., the Filter Mode Retransmission Counter for that multicast i.e., the Filter Mode Retransmission Counter for that multicast
address is zero, an ALLOW and a BLOCK record is included. The address is zero, an ALLOW and a BLOCK record is included. The
contents of these records are built according to Table 4. contents of these records are built according to Table 4.
skipping to change at line 1703 skipping to change at line 1703
| | from the Retransmission List) that must be blocked. | | | from the Retransmission List) that must be blocked. |
| | For each included source, its Source Retransmission | | | For each included source, its Source Retransmission |
| | Counter is decreased with one unit after the | | | Counter is decreased with one unit after the |
| | transmission of the report. If the counter reaches | | | transmission of the report. If the counter reaches |
| | zero, the source is deleted from the Retransmission | | | zero, the source is deleted from the Retransmission |
| | List for that multicast address. | | | List for that multicast address. |
+--------+-----------------------------------------------------+ +--------+-----------------------------------------------------+
Table 4: Determining Contents of Source-List-Change Records Table 4: Determining Contents of Source-List-Change Records
If the computed source list for either an ALLOW or a BLOCK record If the computed source-list for either an ALLOW or a BLOCK record
is empty, that record is omitted from the State-Change Report. is empty, that record is omitted from the State-Change Report.
7. Description of the Protocol for Multicast Routers 7. Description of the Protocol for Multicast Routers
The purpose of MLD is to enable each multicast router to learn, for The purpose of MLD is to enable each multicast router to learn, for
each of its directly attached links, which multicast addresses have each of its directly attached links, which multicast addresses have
listeners on that link. MLD version 2 adds the capability for a listeners on that link. MLD version 2 adds the capability for a
multicast router to also learn which sources have listeners among the multicast router to also learn which sources have listeners among the
neighboring nodes, for packets sent to any particular multicast neighboring nodes, for packets sent to any particular multicast
address. The information gathered by MLD is provided to whichever address. The information gathered by MLD is provided to whichever
skipping to change at line 1781 skipping to change at line 1781
Listening state (and set of sources they listen to) with Current Listening state (and set of sources they listen to) with Current
State Multicast Address Records in MLD Version 2 Multicast Listener State Multicast Address Records in MLD Version 2 Multicast Listener
Reports. Reports.
As a listener of a multicast address, a node may express interest in As a listener of a multicast address, a node may express interest in
listening or not listening to traffic from particular sources. As listening or not listening to traffic from particular sources. As
the desired listening state of a node changes, it reports these the desired listening state of a node changes, it reports these
changes using Filter-Mode-Change Records or Source-List-Change changes using Filter-Mode-Change Records or Source-List-Change
Records. These records indicate an explicit state change in a Records. These records indicate an explicit state change in a
multicast address at a node in either the Multicast Address Record's multicast address at a node in either the Multicast Address Record's
source list or its filter mode. When Multicast Address Listening is source-list or its filter-mode. When Multicast Address Listening is
terminated at a node or traffic from a particular source is no longer terminated at a node or traffic from a particular source is no longer
desired, the Querier must query for other listeners of the multicast desired, the Querier must query for other listeners of the multicast
address or of the source before deleting the multicast address (or address or of the source before deleting the multicast address (or
source) from its Multicast Address Listening state and pruning its source) from its Multicast Address Listening state and pruning its
traffic. traffic.
To enable all nodes on a link to respond to changes in multicast To enable all nodes on a link to respond to changes in multicast
address listening, the Querier sends specific queries. A Multicast address listening, the Querier sends specific queries. A Multicast
Address Specific Query is sent to verify that there are no nodes that Address Specific Query is sent to verify that there are no nodes that
listen to the specified multicast address or to "rebuild" the listen to the specified multicast address or to "rebuild" the
skipping to change at line 1814 skipping to change at line 1814
order to learn if any node listens to packets sent to the specified order to learn if any node listens to packets sent to the specified
multicast address, from the specified source addresses. Multicast multicast address, from the specified source addresses. Multicast
Address and Source Specific Queries are only sent in response to Address and Source Specific Queries are only sent in response to
State-Change Records and never in response to Current-State Records. State-Change Records and never in response to Current-State Records.
Section 5.1.13 describes each query in more detail. Section 5.1.13 describes each query in more detail.
7.2. MLD State Maintained by Multicast Routers 7.2. MLD State Maintained by Multicast Routers
Multicast routers that implement the MLDv2 protocol keep state per Multicast routers that implement the MLDv2 protocol keep state per
multicast address per attached link. This multicast address state multicast address per attached link. This multicast address state
consists of a filter mode, a list of sources, and various timers. consists of a filter-mode, a list of sources, and various timers.
For each attached link on which MLD runs, a multicast router records For each attached link on which MLD runs, a multicast router records
the listening state for that link. That state conceptually consists the listening state for that link. That state conceptually consists
of a set of records of the form: of a set of records of the form:
(IPv6 multicast address, Filter Timer, (IPv6 multicast address, Filter Timer,
Router Filter Mode, (source records) ) Router Filter Mode, (source records) )
Each source record is of the form: Each source record is of the form:
(IPv6 source address, source timer) (IPv6 source address, source timer)
If all sources for a multicast address are listened to, an empty If all sources for a multicast address are listened to, an empty
source record list is kept with the Router Filter Mode set to source record list is kept with the Router Filter Mode set to
EXCLUDE. This means that nodes on this link want all sources for EXCLUDE. This means that nodes on this link want all sources for
this multicast address to be forwarded. This is the MLDv2 equivalent this multicast address to be forwarded. This is the MLDv2 equivalent
of an MLDv1 listening state. of an MLDv1 listening state.
7.2.1. Definition of Router Filter Mode 7.2.1. Definition of Router Filter Mode
To reduce internal state, MLDv2 routers keep a filter mode per To reduce internal state, MLDv2 routers keep a filter-mode per
multicast address per attached link. This filter mode is used to multicast address per attached link. This filter-mode is used to
summarize the total listening state of a multicast address to a summarize the total listening state of a multicast address to a
minimum set such that all nodes' listening states are respected. The minimum set such that all nodes' listening states are respected. The
filter mode may change in response to the reception of particular filter-mode may change in response to the reception of particular
types of Multicast Address Records or when certain timer conditions types of Multicast Address Records or when certain timer conditions
occur. In the following sections, we use the term "Router Filter occur. In the following sections, we use the term "Router Filter
Mode" to refer to the filter mode of a particular multicast address Mode" to refer to the filter-mode of a particular multicast address
within a router. Section 7.4 describes the changes of the Router within a router. Section 7.4 describes the changes of the Router
Filter Mode per Multicast Address Record received. Filter Mode per Multicast Address Record received.
A router is in INCLUDE mode for a specific multicast address on a A router is in INCLUDE mode for a specific multicast address on a
given interface if all the listeners on the link interested in that given interface if all the listeners on the link interested in that
address are in INCLUDE mode. The router state is represented through address are in INCLUDE mode. The router state is represented through
the notation INCLUDE (A), where A is called the "Include List". The the notation INCLUDE (A), where A is called the "Include List". The
Include List is the set of sources that one or more listeners on the Include List is the set of sources that one or more listeners on the
link have requested to receive. All the sources from the Include link have requested to receive. All the sources from the Include
List will be forwarded by the router. Any other source that is not List will be forwarded by the router. Any other source that is not
in the Include List will be blocked by the router. in the Include List will be blocked by the router.
A router is in EXCLUDE mode for a specific multicast address on a A router is in EXCLUDE mode for a specific multicast address on a
given interface if there is at least one listener in EXCLUDE mode given interface if there is at least one listener in EXCLUDE mode
interested in that address on the link. Conceptually, when a interested in that address on the link. Conceptually, when a
Multicast Address Record is received, the Router Filter Mode for that Multicast Address Record is received, the Router Filter Mode for that
multicast address is updated to cover all the requested sources using multicast address is updated to cover all the requested sources using
the least amount of state. As a rule, once a Multicast Address the least amount of state. As a rule, once a Multicast Address
Record with a filter mode of EXCLUDE is received, the Router Filter Record with a filter-mode of EXCLUDE is received, the Router Filter
Mode for that multicast address will be set to EXCLUDE. Mode for that multicast address will be set to EXCLUDE.
Nevertheless, if all nodes with a Multicast Address Record having Nevertheless, if all nodes with a Multicast Address Record having
filter mode set to EXCLUDE cease reporting, it is desirable for the filter-mode set to EXCLUDE cease reporting, it is desirable for the
Router Filter Mode for that multicast address to transition back to Router Filter Mode for that multicast address to transition back to
INCLUDE mode. This transition occurs when the Filter Timer expires; INCLUDE mode. This transition occurs when the Filter Timer expires;
see Section 7.5 for more details. see Section 7.5 for more details.
When the router is in EXCLUDE mode, the router state is represented When the router is in EXCLUDE mode, the router state is represented
through the notation EXCLUDE (X,Y), where X is called the "Requested through the notation EXCLUDE (X,Y), where X is called the "Requested
List" and Y is called the "Exclude List". All sources, except those List" and Y is called the "Exclude List". All sources, except those
from the Exclude List, will be forwarded by the router. The from the Exclude List, will be forwarded by the router. The
Requested List has no effect on forwarding. Nevertheless, it has to Requested List has no effect on forwarding. Nevertheless, it has to
be maintained for several reasons, as explained in Section 7.2.3. be maintained for several reasons, as explained in Section 7.2.3.
skipping to change at line 1892 skipping to change at line 1892
a specific multicast address, and it represents the time for the a specific multicast address, and it represents the time for the
Router Filter Mode of the multicast address to expire and switch to Router Filter Mode of the multicast address to expire and switch to
INCLUDE mode. A Filter Timer is a decrementing timer with a lower INCLUDE mode. A Filter Timer is a decrementing timer with a lower
bound of zero. One Filter Timer exists per Multicast Address Record. bound of zero. One Filter Timer exists per Multicast Address Record.
Filter timers are updated according to the types of Multicast Address Filter timers are updated according to the types of Multicast Address
Records received. Records received.
If a Filter Timer expires, with the Router Filter Mode for that If a Filter Timer expires, with the Router Filter Mode for that
multicast address being EXCLUDE, it means that there are no more multicast address being EXCLUDE, it means that there are no more
listeners in EXCLUDE mode on the attached link. At this point, the listeners in EXCLUDE mode on the attached link. At this point, the
router transitions to INCLUDE filter mode. Section 7.5 describes the router transitions to INCLUDE filter-mode. Section 7.5 describes the
actions taken when a Filter Timer expires while in EXCLUDE mode. actions taken when a Filter Timer expires while in EXCLUDE mode.
Table 5 summarizes the role of the Filter Timer. Section 7.4 Table 5 summarizes the role of the Filter Timer. Section 7.4
describes the details of setting the Filter Timer per type of describes the details of setting the Filter Timer per type of
Multicast Address Record received. Multicast Address Record received.
+=========+========+================================================+ +=========+========+================================================+
| Router | Filter | Actions/Comments | | Router | Filter | Actions/Comments |
| Filter | Timer | | | Filter | Timer | |
| Mode | Value | | | Mode | Value | |
skipping to change at line 1914 skipping to change at line 1914
| INCLUDE | Not | All listeners in INCLUDE mode. | | INCLUDE | Not | All listeners in INCLUDE mode. |
| | Used | | | | Used | |
+---------+--------+------------------------------------------------+ +---------+--------+------------------------------------------------+
| EXCLUDE | Timer | At least one listener in EXCLUDE mode. | | EXCLUDE | Timer | At least one listener in EXCLUDE mode. |
| | > 0 | | | | > 0 | |
+---------+--------+------------------------------------------------+ +---------+--------+------------------------------------------------+
| EXCLUDE | Timer | No more listeners in EXCLUDE mode for | | EXCLUDE | Timer | No more listeners in EXCLUDE mode for |
| | == 0 | the multicast address. If the Requested | | | == 0 | the multicast address. If the Requested |
| | | List is empty, delete Multicast Address | | | | List is empty, delete Multicast Address |
| | | Record. If not, switch to INCLUDE | | | | Record. If not, switch to INCLUDE |
| | | filter mode; the sources in the | | | | filter-mode; the sources in the |
| | | Requested List are moved to the Include | | | | Requested List are moved to the Include |
| | | List, and the Exclude List is deleted. | | | | List, and the Exclude List is deleted. |
+---------+--------+------------------------------------------------+ +---------+--------+------------------------------------------------+
Table 5: Filter Timer Management Table 5: Filter Timer Management
7.2.3. Definition of Source Timers 7.2.3. Definition of Source Timers
A Source Timer is a decrementing timer with a lower bound of zero. A Source Timer is a decrementing timer with a lower bound of zero.
One Source Timer is kept per source record. Source timers are One Source Timer is kept per source record. Source timers are
updated according to the type and filter mode of the Multicast updated according to the type and filter-mode of the Multicast
Address Record received. Section 7.4 describes the setting of source Address Record received. Section 7.4 describes the setting of source
timers per type of Multicast Address Records received. timers per type of Multicast Address Records received.
In the following, abbreviations are used for several variables (all In the following, abbreviations are used for several variables (all
of which are described in detail in Section 9). The variable MALI of which are described in detail in Section 9). The variable MALI
stands for the Multicast Address Listening Interval, which is the stands for the Multicast Address Listening Interval, which is the
time in which multicast address listening state will time out. The time in which multicast address listening state will time out. The
variable LLQT is the Last Listener Query Time, which is the total variable LLQT is the Last Listener Query Time, which is the total
time the router should wait for a report, after the Querier has sent time the router should wait for a report, after the Querier has sent
the first query. During this time, the Querier should send [Last the first query. During this time, the Querier should send [Last
Member Query Count]-1 retransmissions of the query. LLQT represents Member Query Count]-1 retransmissions of the query. LLQT represents
the leave latency or the difference between the transmission of a the leave latency or the difference between the transmission of a
listener state change and the modification of the information passed listener state change and the modification of the information passed
to the routing protocol. to the routing protocol.
If the router is in INCLUDE filter mode, a source can be added to the If the router is in INCLUDE filter-mode, a source can be added to the
current Include List if a listener in INCLUDE mode sends a Current- current Include List if a listener in INCLUDE mode sends a Current-
State or a State-Change Report that includes that source. Each State or a State-Change Report that includes that source. Each
source from the Include List is associated with a Source Timer that source from the Include List is associated with a Source Timer that
is updated whenever a listener in INCLUDE mode sends a report that is updated whenever a listener in INCLUDE mode sends a report that
confirms its interest in that specific source. If the timer of a confirms its interest in that specific source. If the timer of a
source from the Include List expires, the source is deleted from the source from the Include List expires, the source is deleted from the
Include List. If there are no more source records left, the Include List. If there are no more source records left, the
Multicast Address Record is deleted from the router. Multicast Address Record is deleted from the router.
Besides this "soft leave" mechanism, there is also a "fast leave" Besides this "soft leave" mechanism, there is also a "fast leave"
skipping to change at line 2031 skipping to change at line 2031
7.3. MLDv2 Source-Specific Forwarding Rules 7.3. MLDv2 Source-Specific Forwarding Rules
When a multicast router receives a datagram from a source destined to When a multicast router receives a datagram from a source destined to
a particular multicast address, a decision has to be made whether to a particular multicast address, a decision has to be made whether to
forward the datagram on an attached link or not. The multicast forward the datagram on an attached link or not. The multicast
routing protocol in use is in charge of this decision and should use routing protocol in use is in charge of this decision and should use
the MLDv2 information to ensure that all sources/multicast addresses the MLDv2 information to ensure that all sources/multicast addresses
that have listeners on a link are forwarded to that link. MLDv2 that have listeners on a link are forwarded to that link. MLDv2
information does not override multicast routing information; for information does not override multicast routing information; for
example, if the MLDv2 filter mode for a multicast address is EXCLUDE, example, if the MLDv2 filter-mode for a multicast address is EXCLUDE,
a router may still forward packets for excluded sources to a transit a router may still forward packets for excluded sources to a transit
link. link.
To summarize, Table 6 below describes the forwarding suggestions made To summarize, Table 6 below describes the forwarding suggestions made
by MLDv2 to the routing protocol for traffic originating from a by MLDv2 to the routing protocol for traffic originating from a
source destined to a multicast address. It also summarizes the source destined to a multicast address. It also summarizes the
actions taken upon the expiration of a Source Timer based on the actions taken upon the expiration of a Source Timer based on the
Router Filter Mode of the multicast address. Router Filter Mode of the multicast address.
+=========+=========+=========================================+ +=========+=========+=========================================+
skipping to change at line 2099 skipping to change at line 2099
7.4.1. Reception of Current-State Records 7.4.1. Reception of Current-State Records
When receiving Current-State Records, a router updates both its When receiving Current-State Records, a router updates both its
Filter Timer and its source timers. In some circumstances, the Filter Timer and its source timers. In some circumstances, the
reception of a type of Multicast Address Record will cause the Router reception of a type of Multicast Address Record will cause the Router
Filter Mode for that multicast address to change. Table 7 describes Filter Mode for that multicast address to change. Table 7 describes
the actions, with respect to state and timers, that occur to a the actions, with respect to state and timers, that occur to a
router's state upon reception of Current-State Records. router's state upon reception of Current-State Records.
If the router is in INCLUDE filter mode for a multicast address, we If the router is in INCLUDE filter-mode for a multicast address, we
will use the notation INCLUDE (A), where A denotes the associated will use the notation INCLUDE (A), where A denotes the associated
Include List. If the router is in EXCLUDE filter mode for a Include List. If the router is in EXCLUDE filter-mode for a
multicast address, we will use the notation EXCLUDE (X,Y), where X multicast address, we will use the notation EXCLUDE (X,Y), where X
and Y denote the associated Requested List and Exclude List, and Y denote the associated Requested List and Exclude List,
respectively. respectively.
Within the "Actions" section of the router state tables, we use the Within the "Actions" section of the router state tables, we use the
notation '(A)=J', which means that set A of the source records should notation '(A)=J', which means that set A of the source records should
have their source timers set to value J. 'Delete (A)' means that set have their source timers set to value J. 'Delete (A)' means that set
A of the source records should be deleted. 'Filter Timer = J' means A of the source records should be deleted. 'Filter Timer = J' means
that the Filter Timer for the multicast address should be set to that the Filter Timer for the multicast address should be set to
value J. value J.
skipping to change at line 2167 skipping to change at line 2167
Multicast Address Specific queries can also be used in order to Multicast Address Specific queries can also be used in order to
enable a fast transition of a router from EXCLUDE to INCLUDE mode, in enable a fast transition of a router from EXCLUDE to INCLUDE mode, in
case a received Multicast Address Record motivates this action. The case a received Multicast Address Record motivates this action. The
Filter Timer for that multicast address is lowered to a small Filter Timer for that multicast address is lowered to a small
interval of Last Listener Query Time milliseconds. If any Multicast interval of Last Listener Query Time milliseconds. If any Multicast
Address Records that express EXCLUDE mode interest in the multicast Address Records that express EXCLUDE mode interest in the multicast
address are received within this interval, the Filter Timer is address are received within this interval, the Filter Timer is
updated and the suggestion to the routing protocol to forward the updated and the suggestion to the routing protocol to forward the
multicast address stands without any interruption. If not, the multicast address stands without any interruption. If not, the
router will switch to INCLUDE filter mode for that multicast address. router will switch to INCLUDE filter-mode for that multicast address.
During the query period (i.e., Last Listener Query Time During the query period (i.e., Last Listener Query Time
milliseconds), the MLD component in the router continues to suggest milliseconds), the MLD component in the router continues to suggest
to the routing protocol to forward traffic from the multicast to the routing protocol to forward traffic from the multicast
addresses or sources that are queried. It is not until after Last addresses or sources that are queried. It is not until after Last
Listener Query Time milliseconds, and without receiving a record that Listener Query Time milliseconds, and without receiving a record that
expresses interest in the queried multicast address or sources, that expresses interest in the queried multicast address or sources, that
the router may prune the multicast address or sources from the link. the router may prune the multicast address or sources from the link.
Table 8 describes the changes in multicast address state and the Table 8 describes the changes in multicast address state and the
action(s) taken when receiving either Filter-Mode-Change or Source- action(s) taken when receiving either Filter-Mode-Change or Source-
List-Change Records. Table 8 also describes the queries that are List-Change Records. Table 8 also describes the queries that are
sent by the Querier when a particular report is received. sent by the Querier when a particular report is received.
We use the following notation to describe the queries that are sent. We use the following notation to describe the queries that are sent.
We use the notation 'Q(MA)' to describe a Multicast Address Specific We use the notation 'Q(MA)' to describe a Multicast Address Specific
Query to the MA multicast address. We use the notation 'Q(MA,A)' to Query to the MA multicast address. We use the notation 'Q(MA,A)' to
describe a Multicast Address and Source Specific Query to the MA describe a Multicast Address and Source Specific Query to the MA
multicast address with source list A. If source list A is null as a multicast address with source-list A. If source-list A is null as a
result of the action (e.g. A*B), then no query is sent as a result of result of the action (e.g. A*B), then no query is sent as a result of
the operation. the operation.
In order to maintain protocol robustness, queries defined in the In order to maintain protocol robustness, queries defined in the
Actions column of Table 8 need to be transmitted [Last Listener Query Actions column of Table 8 need to be transmitted [Last Listener Query
Count] times, once every [Last Listener Query Interval] period. Count] times, once every [Last Listener Query Interval] period.
If while scheduling new queries there are already pending queries to If while scheduling new queries there are already pending queries to
be retransmitted for the same multicast address, the new and pending be retransmitted for the same multicast address, the new and pending
queries have to be merged. In addition, received host reports for a queries have to be merged. In addition, received host reports for a
skipping to change at line 2241 skipping to change at line 2241
+---------+----------+--------------------+------------------------+ +---------+----------+--------------------+------------------------+
Table 8: Multicast Router State Transitions Table 8: Multicast Router State Transitions
7.5. Switching Router Filter Modes 7.5. Switching Router Filter Modes
The Filter Timer is used as a mechanism for transitioning the Router The Filter Timer is used as a mechanism for transitioning the Router
Filter Mode from EXCLUDE to INCLUDE. Filter Mode from EXCLUDE to INCLUDE.
When a Filter Timer expires with a Router Filter Mode of EXCLUDE, a When a Filter Timer expires with a Router Filter Mode of EXCLUDE, a
router assumes that there are no nodes with a filter mode of EXCLUDE router assumes that there are no nodes with a filter-mode of EXCLUDE
present on the attached link. Thus, the router transitions to present on the attached link. Thus, the router transitions to
INCLUDE filter mode for the multicast address. INCLUDE filter-mode for the multicast address.
A router uses the sources from the Requested List as its state for A router uses the sources from the Requested List as its state for
the switch to a filter mode of INCLUDE. Sources from the Requested the switch to a filter-mode of INCLUDE. Sources from the Requested
List are moved in the Include List, while sources from the Exclude List are moved in the Include List, while sources from the Exclude
List are deleted. For example, if a router's state for a multicast List are deleted. For example, if a router's state for a multicast
address is EXCLUDE(X,Y) and the Filter Timer expires for that address is EXCLUDE(X,Y) and the Filter Timer expires for that
multicast address, the router switches to filter mode of INCLUDE with multicast address, the router switches to filter-mode of INCLUDE with
state INCLUDE(X). If at the moment of the switch the Requested List state INCLUDE(X). If at the moment of the switch the Requested List
(X) is empty, the Multicast Address Record is deleted from the (X) is empty, the Multicast Address Record is deleted from the
router. router.
7.6. Action on Reception of Queries 7.6. Action on Reception of Queries
Upon reception of an MLD message that contains a Query, the router Upon reception of an MLD message that contains a Query, the router
checks if the source address of the message is a valid link-local checks if the source address of the message is a valid link-local
address, if the Hop Limit is set to 1, and if the Router Alert option address, if the Hop Limit is set to 1, and if the Router Alert option
is present in the Hop-by-Hop Options header of the IPv6 packet. If is present in the Hop-by-Hop Options header of the IPv6 packet. If
skipping to change at line 2746 skipping to change at line 2746
A forged Version 1 Query Message will put MLDv2 listeners on that A forged Version 1 Query Message will put MLDv2 listeners on that
link in MLDv1 Host Compatibility Mode. This scenario can be avoided link in MLDv1 Host Compatibility Mode. This scenario can be avoided
by providing MLDv2 hosts with a configuration option to ignore by providing MLDv2 hosts with a configuration option to ignore
Version 1 messages completely. Version 1 messages completely.
A DoS attack on a node could be staged through forged Multicast A DoS attack on a node could be staged through forged Multicast
Address and Source Specific Queries. The attacker can find out about Address and Source Specific Queries. The attacker can find out about
the listening state of a specific node with a General Query. After the listening state of a specific node with a General Query. After
that, it could send a large number of Multicast Address and Source that, it could send a large number of Multicast Address and Source
Specific Queries, each with a large source list and/or long Maximum Specific Queries, each with a large source-list and/or long Maximum
Response Delay. The node will have to store and maintain the sources Response Delay. The node will have to store and maintain the sources
specified in all of those queries for as long as it takes to send the specified in all of those queries for as long as it takes to send the
delayed response. This would consume both memory and CPU cycles in delayed response. This would consume both memory and CPU cycles in
order to augment the recorded sources with the source lists included order to augment the recorded sources with the source-lists included
in the successive queries. in the successive queries.
To protect against such a DoS attack, a node stack implementation To protect against such a DoS attack, a node stack implementation
could restrict the number of Multicast Address and Source Specific could restrict the number of Multicast Address and Source Specific
Queries per multicast address within this interval and/or record only Queries per multicast address within this interval and/or record only
a limited number of sources. a limited number of sources.
10.2. Current-State Report Messages 10.2. Current-State Report Messages
A forged Report message may cause multicast routers to think there A forged Report message may cause multicast routers to think there
skipping to change at line 2970 skipping to change at line 2970
Appendix B. Summary of Changes Appendix B. Summary of Changes
B.1. MLDv1 B.1. MLDv1
The following is a summary of changes from MLDv1, specified in The following is a summary of changes from MLDv1, specified in
[RFC2710]. [RFC2710].
* MLDv2 introduces source filtering. * MLDv2 introduces source filtering.
* The IP service interface of MLDv2 nodes is modified accordingly. * The IP service interface of MLDv2 nodes is modified accordingly.
It enables the specification of a filter mode and a source list. It enables the specification of a filter-mode and a source-list.
* An MLDv2 node keeps per-socket and per-interface Multicast Address * An MLDv2 node keeps per-socket and per-interface Multicast Address
Listening states that include a filter mode and a source list for Listening states that include a filter-mode and a source-list for
each multicast address. This enables packet filtering based on a each multicast address. This enables packet filtering based on a
socket's multicast reception state. socket's multicast reception state.
* MLDv2 state kept on routers includes a filter mode and a list of * MLDv2 state kept on routers includes a filter-mode and a list of
sources and source timers for each multicast address that has sources and source timers for each multicast address that has
listeners on the link. MLDv1 routers kept only the list of listeners on the link. MLDv1 routers kept only the list of
multicast addresses. multicast addresses.
* Queries include additional fields (Section 5.1). * Queries include additional fields (Section 5.1).
* The S flag is included in queries in order to fix robustness * The S flag is included in queries in order to fix robustness
issues. issues.
* The Querier's Robustness Variable and Query Interval Code are * The Querier's Robustness Variable and Query Interval Code are
 End of changes. 82 change blocks. 
99 lines changed or deleted 99 lines changed or added

This html diff was produced by rfcdiff 1.48.