|
Bugzilla – Full Text Bug Listing |
| Summary: | Ipv6L3Protocol should trash multicast packets not interesting for the node | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | ipv6 | Assignee: | Tommaso Pecorella <tommaso.pecorella> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs, tomh |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Patch | ||
The patch could look a bit strange on some parts, but it's made to be compliant with the upcoming MLDv2, where filtering is way more fine-grained. In this patch the filtering is assumed to be *only* based on the Destination / Interface pair. MLDv2 also takes into account the source address. The relevant source-based filters could be added with MLDv2. why is Ipv6LeaveGroup (void) without any parameters? Does this leave _all_ groups? Do you need to join a group with no sources to just leave that specific group? Or is it assumed that only one group is ever joined, and if so, please specify what happens if JoinGroup() is called repeatedly for different groups? Please adjust the doxygen accordingly.
I'd suggest to add more detail to the below doxygen, or a \see of some sort
+ * \enum Ipv6MulticastFilterMode
+ * \brief Enumeration of the possible filter of a socket.
+ */
+ enum Ipv6MulticastFilterMode
this should be a WARN:
+ NS_LOG_LOGIC ("not adding a non-multicast address " << address);
this should be a NS_LOG_FUNCTION (this << address):
+bool Ipv6Interface::IsSolicitedMulticastAddress (Ipv6Address address) const
+ NS_LOG_FUNCTION_NOARGS ();
(perhaps other log statements need to be similarly fixed in this file).
Otherwise, I am fine with the proposal.
(In reply to Tom Henderson from comment #2) > why is Ipv6LeaveGroup (void) without any parameters? Does this leave _all_ groups? Just the one the socket did bind to. And yes, it's a bug: if more than one socket is listening to the same group, the first disjoining will force-disjoin the second one. I'll add a counter to prevent such things. > Do you need to join a group with no sources to just leave that > specific group? Or is it assumed that only one group is ever joined, and if > so, please specify what happens if JoinGroup() is called repeatedly for > different groups? Please adjust the doxygen accordingly. Will do. To summarize it: JoinGroup with INCLUDE and no sources is equivalent to leaving a group (see the MLDv2 specifications). > I'd suggest to add more detail to the below doxygen, or a \see of some sort > > + * \enum Ipv6MulticastFilterMode > + * \brief Enumeration of the possible filter of a socket. > + */ > + enum Ipv6MulticastFilterMode > > this should be a WARN: > + NS_LOG_LOGIC ("not adding a non-multicast address " << address); > > this should be a NS_LOG_FUNCTION (this << address): > > +bool Ipv6Interface::IsSolicitedMulticastAddress (Ipv6Address address) const > + NS_LOG_FUNCTION_NOARGS (); > > (perhaps other log statements need to be similarly fixed in this file). > > Otherwise, I am fine with the proposal. changeset: 11778:710f305a22c9 |
Created attachment 2198 [details] Patch Ipv6L3Protocol::Receive should not forward up all the multicast packets regardless if there's a socket interested in them.