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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Dan Smith (danms@xxxxxxxxxx):
> This causes checkpoint to fail if an interface actually has a
> multicast membership.
> 
> Signed-off-by: Dan Smith <danms@xxxxxxxxxx>
> ---
>  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
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux