Skip to contentSkip to conversation

ipv6 multicast forwarding: Remove threshold checking and some trivial bugs

RFC PATCH In review Ang Way Chuang 2 participants 3 messages Dec 18, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ipv6 multicast forwarding: Remove threshold checking and some trivial bugs

This patch fixes trivial bugs for IPv6 multicast forwarding code and remove threshold checking for multicast forwarding cache.

1. Threshold checking in IPv6 multicast forwarding cache (MFC) was not properly implemented. syscall to setsockopt(... MRT6_ADD_MIF,...) doesn't affect the TTL because it is never used. In fact, all MFC will always have ttl of 1 as set by ip6mr_mfc_add. From my limited knowledge of multicast routing, threshold setting on interface is only used by DVMRP which doesn't support IPv6. FreeBSD's struct mif6ctl doesn't have vifc_threshold. This patch removes the ttl cruft within kernel. Userspace ABI for backward compatibility. Can someone knowledgable in multicast routing please verify whether my understanding is correct?
2. Don't allow addition of MFC with non-existent multicast interface index.
3. Don't allow addition of MFC where incoming interface is part of oif list. This does not make sense. Why would we want to send a multicast back to the interface where it originates from.
4. setsockopt(....MRT6_ADD_MIF, ) allows a "physical" interface to be registered as multicast interface multiple times. This doesn't make sense. Don't allow registration duplicate registration of the same "physical" interface.

This patch has been tested, albeit minimally using a simple program. Is this patch okay for inclusion? Will sign off if it is okay.

---
 include/linux/mroute6.h |    3 +-
 net/ipv6/ip6mr.c        |   79 +++++++++++++++++++++++++----------------------
 2 files changed, 43 insertions(+), 39 deletions(-)
include/linux/mroute6.h +1 -2
index a223561..88a79d8 100644
@@ -66,7 +66,6 @@ struct mif_device {
 	unsigned long	bytes_in,bytes_out;
 	unsigned long	pkt_in,pkt_out;		/* Statistics 			*/
 	unsigned long	rate_limit;		/* Traffic shaping (NI) 	*/
-	unsigned char	threshold;		/* TTL threshold 		*/
 	unsigned short	flags;			/* Control flags 		*/
 	int		link;			/* Physical interface index	*/
 };
@@ -92,7 +91,7 @@ struct mfc6_cache {
 			unsigned long bytes;
 			unsigned long pkt;
 			unsigned long wrong_if;
-			unsigned char ttls[MAXMIFS];	/* TTL thresholds		*/
+			struct if_set mf6c_ifset;	/* Where it is going */
 		} res;
 	} mfc_un;
 };
net/ipv6/ip6mr.c +42 -37

163 lines not on this page · raw message

maintainer
#1 lore raw

From: Ang Way Chuang <[email protected]>
Date: Tue, 18 Dec 2012 12:57:11 +0800

Quoted 17 lines

This patch fixes trivial bugs for IPv6 multicast forwarding code and remove threshold checking for multicast forwarding cache.

1. Threshold checking in IPv6 multicast forwarding cache (MFC) was not properly implemented. syscall to setsockopt(... MRT6_ADD_MIF,...) doesn't affect the TTL because it is never used. In fact, all MFC will always have ttl of 1 as set by ip6mr_mfc_add. From my limited knowledge of multicast routing, threshold setting on interface is only used by DVMRP which doesn't support IPv6. FreeBSD's struct mif6ctl doesn't have vifc_threshold. This patch removes the ttl cruft within kernel. Userspace ABI for backward compatibility. Can someone knowledgable in multicast routing please verify whether my understanding is correct?
2. Don't allow addition of MFC with non-existent multicast interface index.
3. Don't allow addition of MFC where incoming interface is part of oif list. This does not make sense. Why would we want to send a multicast back to the interface where it originates from.
4. setsockopt(....MRT6_ADD_MIF, ) allows a "physical" interface to be registered as multicast interface multiple times. This doesn't make sense. Don't allow registration duplicate registration of the same "physical" interface.

Quoted 2 lines

This patch has been tested, albeit minimally using a simple program. Is this patch okay for inclusion? Will sign off if it is okay.

How about we don't mix together a set of bug fixes, with a semantic change (the removal of the threshold checking)?

I also don't see what the point is of not signing off on this change when you submit it.

If you delay the signoff until after review, you're just causing it to take longer to have your changes integrated. It also makes it look like you didn't believe fully in your change, so you probably should have sent it as an RFC and listed your doubts in the email instead.

Overall I would rate this as an extremely poor patch submission, sorry.

#2 lore raw

Oops, sorry. You're right. I am not very confident with this modification. It may break some multicast routing daemon. Let's drop this for now.

Quoted 41 lines · David Miller

From: Ang Way Chuang <[email protected]>
Date: Tue, 18 Dec 2012 12:57:11 +0800

Quoted 17 lines

This patch fixes trivial bugs for IPv6 multicast forwarding code and remove threshold checking for multicast forwarding cache.

1. Threshold checking in IPv6 multicast forwarding cache (MFC) was not properly implemented. syscall to setsockopt(... MRT6_ADD_MIF,...) doesn't affect the TTL because it is never used. In fact, all MFC will always have ttl of 1 as set by ip6mr_mfc_add. From my limited knowledge of multicast routing, threshold setting on interface is only used by DVMRP which doesn't support IPv6. FreeBSD's struct mif6ctl doesn't have vifc_threshold. This patch removes the ttl cruft within kernel. Userspace ABI for backward compatibility. Can someone knowledgable in multicast routing please verify whether my understanding is correct?
2. Don't allow addition of MFC with non-existent multicast interface index.
3. Don't allow addition of MFC where incoming interface is part of oif list. This does not make sense. Why would we want to send a multicast back to the interface where it originates from.
4. setsockopt(....MRT6_ADD_MIF, ) allows a "physical" interface to be registered as multicast interface multiple times. This doesn't make sense. Don't allow registration duplicate registration of the same "physical" interface.

Quoted 2 lines

This patch has been tested, albeit minimally using a simple program. Is this patch okay for inclusion? Will sign off if it is okay.

How about we don't mix together a set of bug fixes, with a semantic change (the removal of the threshold checking)?

I also don't see what the point is of not signing off on this change when you submit it.

If you delay the signoff until after review, you're just causing it to take longer to have your changes integrated. It also makes it look like you didn't believe fully in your change, so you probably should have sent it as an RFC and listed your doubts in the email instead.

Overall I would rate this as an extremely poor patch submission, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html