[PATCH 2/4] Fail checkpoint if IPv4 multicast addresses are configured

Dan Smith danms at us.ibm.com
Thu Apr 8 10:48:50 PDT 2010


This causes checkpoint to fail if an interface actually has a
multicast membership.

Signed-off-by: Dan Smith <danms at us.ibm.com>
---
 net/ipv4/devinet.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index fa7799c..83411fc 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1624,6 +1624,7 @@ static int devinet_checkpoint(struct ckpt_ctx *ctx, struct net_device *dev,
 {
 	struct in_device *indev = dev->ip_ptr;
 	struct in_ifaddr *addr = indev->ifa_list;
+	struct ip_mc_list *mcaddr;
 
 	for (addr = indev->ifa_list; addr ; addr = addr->ifa_next) {
 		addrs[index].type = CKPT_NETDEV_ADDR_IPV4;
@@ -1636,6 +1637,20 @@ static int devinet_checkpoint(struct ckpt_ctx *ctx, struct net_device *dev,
 			return -E2BIG;
 	}
 
+	for (mcaddr = indev->mc_list; mcaddr; mcaddr = mcaddr->next) {
+		if ((mcaddr->multiaddr & IGMP_LOCAL_GROUP_MASK) ==
+		    IGMP_LOCAL_GROUP)
+			continue;
+
+		/* TODO */
+
+		/* Multicast addresses are not supported, so do not
+		 * allow checkpoint to continue if one is assigned
+		 */
+		ckpt_debug("ipv4 multicast addresses are not supported\n");
+		return -EINVAL;
+	}
+
 	return index;
 }
 
-- 
1.6.2.5



More information about the Containers mailing list