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

Serge E. Hallyn serue at us.ibm.com
Mon Apr 12 09:09:56 PDT 2010


Quoting Dan Smith (danms at us.ibm.com):
> 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");

Could you use a ckpt_err() here?  This ultimately will be the most informative
reason for the failed checkpoint...

> +		return -EINVAL;
> +	}
> +
>  	return index;
>  }
> 
> -- 
> 1.6.2.5


More information about the Containers mailing list